Add SpaceX (SPCX) financial briefing example using finance_search#69
Merged
Conversation
Adds a focused cookbook example showing how finance_search handles a newly-listed, segment-heavy ticker (NASDAQ: SPCX, Space Exploration Technologies Corp.). One Agent API call produces a 6-section briefing covering snapshot, FY2023-FY2025 P&L trajectory, FY2025 segment mix, Starlink KPIs, capacity & backlog, and a labeled bottom line. Demonstrates two reusable patterns: - Recycled-ticker disambiguation (SPCX was previously a SPAC ETF) - Multi-invocation finance_search via max_steps and explicit prompt enumeration of data areas Validated against the live Agent API: 7 finance_search results across 4 categories per run, ~$0.28/run with openai/gpt-5.5, figures match the fiscal.ai SPCX S-1 one-pager.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a focused cookbook example showing how the Agent API's
finance_searchtool handles a newly-listed, segment-heavy ticker — in this case NASDAQ: SPCX, Space Exploration Technologies Corp. (SpaceX), which filed its S-1 in May 2026.A single Agent API call returns a 6-section briefing covering snapshot, FY2023–FY2025 P&L trajectory, FY2025 segment mix (Connectivity / Space / AI), Starlink KPIs, capacity & backlog, and a labeled bottom line. The model exercises 4–7
finance_searchinvocations across four categories per run.Why this is differentiated from
equity-research-briefThe existing
equity-research-briefexample is a generic any-ticker walkthrough. This example is purpose-built around two patterns that are easier to teach with a concrete, fresh ticker:SPCXwas previously assigned to a small SPAC ETF. The system prompt explicitly overrides the legacy mapping and tells the model to trust the segment / KPI rows thatfinance_searchnow returns from the SpaceX S-1. This is a reusable pattern for any newly-listed company with a recycled symbol.max_steps=8gives the agent the budget to actually hit all of them. Without this combination, the briefing comes back mostly "not returned."Files added under
docs/examples/spacex-spcx-briefing/README.mdx— Mintlify-ready writeup with example output, code walkthrough, and prompting guidancespacex_spcx_briefing.py— single-file CLI that issues one Agent API callrequirements.txt—perplexityai>=0.6.0Test results
Validated against the live API with
openai/gpt-5.5:finance_resultsblocks across 4 categories (quote, financials, segments, kpis)Data source attribution
Structured SPCX data returned by
finance_searchis sourced from fiscal.ai, Perplexity's finance data provider. The README mentions the provider in a dedicated "Data Source" section.Follow-up
Once this is merged, I'll mirror the example into
ppl-ai/api-docsvia the standard cookbook → docs flow so it appears ondocs.perplexity.ai.