LLM Analysis¶
Planned Architecture (Future Phases)
The LLM analysis service is implemented in Phase 3 (Weeks 8–11).
Overview¶
Analysis Types¶
Company Summary¶
Financial Ratio Commentary¶
Company Comparison¶
Trend Analysis¶
Prompt Engineering¶
System Prompt¶
Output Schema¶
{
"summary": "...",
"key_points": ["...", "..."],
"risk_flags": ["..."],
"confidence": 0.87,
"sources": [{ "filing_id": 42, "chunk_index": 7 }]
}
Model Selection¶
| Use Case | Model | Reason |
|---|---|---|
| Short summaries | GPT-4o-mini | Low cost, fast |
| Deep analysis | GPT-4o / Claude Sonnet | Higher accuracy |
| Embeddings | text-embedding-3-small | Best cost/quality ratio |