Skip to content

Add SpaceX (SPCX) financial briefing example using finance_search#69

Merged
jliounis merged 2 commits into
mainfrom
add-spacex-spcx-briefing-example
May 26, 2026
Merged

Add SpaceX (SPCX) financial briefing example using finance_search#69
jliounis merged 2 commits into
mainfrom
add-spacex-spcx-briefing-example

Conversation

@jliounis

Copy link
Copy Markdown
Collaborator

Summary

Adds a focused cookbook example showing how the Agent API's finance_search tool 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_search invocations across four categories per run.

Why this is differentiated from equity-research-brief

The existing equity-research-brief example is a generic any-ticker walkthrough. This example is purpose-built around two patterns that are easier to teach with a concrete, fresh ticker:

  1. Recycled-ticker disambiguation. SPCX was 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 that finance_search now returns from the SpaceX S-1. This is a reusable pattern for any newly-listed company with a recycled symbol.
  2. Multi-invocation finance_search. Models often grab a single quote payload and stop. The prompt enumerates the data areas (quote / income statement / segments / KPIs) and max_steps=8 gives 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 guidance
  • spacex_spcx_briefing.py — single-file CLI that issues one Agent API call
  • requirements.txtperplexityai>=0.6.0

Test results

Validated against the live API with openai/gpt-5.5:

  • 7 structured finance_results blocks across 4 categories (quote, financials, segments, kpis)
  • ~$0.28 total cost per run
  • Returned figures match the fiscal.ai SPCX S-1 one-pager: FY2025 revenue $18.674B, segments Connectivity $11.4B / Space $4.1B / AI $3.2B, $28.4B total backlog, Q1 2026 Starlink 10.3M subs / $66 ARPU / 9,600 satellites

Data source attribution

Structured SPCX data returned by finance_search is 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-docs via the standard cookbook → docs flow so it appears on docs.perplexity.ai.

jliounis added 2 commits May 26, 2026 16:24
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.
@jliounis jliounis merged commit 39bfbf4 into main May 26, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant