LLM API
The LLM surface wraps the rust engine’s retrieval primitives in four agent-friendly endpoints: /llm/answer (RAG over page transcriptions), /llm/expand (natural-language to KWS query expansion), /llm/page-context (structured per-page context bundle), and /llm/status (poll a running answer job). The configured model and budget are controlled by the LLM profile in cfg.
| Method | Path | Summary | Key params | Response |
|---|---|---|---|---|
| POST | /llm/answer | RAG answer over selected page transcriptions | body: LlmAnswerRequest | LlmAnswerResponse |
| POST | /llm/expand | Translate a natural-language question into a KWS query | body: LlmExpandRequest | LlmExpandResponse |
| POST | /llm/page-context | Structured transcription context for the requested pages | body: LlmAnswerRequest | (no body) |
| POST | /llm/status | Poll a previous /llm/answer call | body: LlmAnswerRequest | (no body) |
Examples
Section titled “Examples”Ask a question (RAG)
curl -X POST -H "X-API-Key: $API_KEY" \ -H "Content-Type: application/json" \ -d '{"question": "who attended the 1789 session?"}' \ "$ARCHAIC/llm/answer"