Summarizer
Summarizer is the Python + FastAPI service that handles hierarchical summarization and Named Entity Recognition (NER) for RAGA. Given a text file, it splits the content into chunks, processes each chunk in parallel through an LLM, then merges the results into a single final summary along with named entities (people, organizations, locations, dates, etc.).
This service is called by API Tarantula (env var SUMMARIZE_URL) to turn documents and audio transcripts into summaries stored as part of a workspace's knowledge source.
Tech Stack
| Component | Technology |
|---|---|
| Runtime | Python 3.11 |
| Framework | FastAPI + uvicorn |
| LLM Client | openai Python SDK (OpenAI-compatible API) |
| HTTP Client | httpx (async), requests (sync health probe) |
| Secret Management | infisical_sdk (Python) |
| Concurrency | asyncio (bounded via a semaphore) |
Full environment variable, endpoint, and pipeline diagram details are on the Technical page.
How It Works
- The text file is split into chunks (bounded by word count, without cutting sentences in half).
- Each chunk is processed in parallel — a single LLM call per chunk produces both a summary and entities ("merge-on-raw" strategy: NER runs on the raw chunk text rather than the summary, for higher entity recall).
- If the combined summaries are still too long, the pipeline runs additional merge passes iteratively.
- A final LLM call merges all chunk summaries into one final summary, and entities from multiple sources are combined (union) into the final result.
Resilience
A single chunk failing does not abort the whole process (asyncio.gather(return_exceptions=True)) — a failed chunk is replaced with an empty result while the rest continue processing. Every LLM call is also retried automatically.
Summary
Summarizer is the single point in the RAGA platform that turns long-form text (documents, audio transcripts) into a structured summary with named entities — built to stay responsive through parallel chunk processing, and to keep going even when some chunks fail.