Incremental Indexing for Financial Research Dashboards — 4 Stages That Preserve Freshness A developer outlined a four-stage incremental indexing architecture for financial research dashboards—document intake, chunk preparation, collection upsert, and bounded query—designed to keep corrected PDFs searchable without breaking traceability of prior citations. The approach carries stable source metadata into every retrieved result and separates ingestion from querying so that freshness and relevance failures can be attributed to a specific stage rather than an opaque "RAG quality" bucket. The developer recommends building an evaluation set from real documents, including supersession cases, and measuring recall and precision before selecting a vector database provider. A financial research dashboard has an awkward retrieval constraint: a corrected PDF must become searchable without making yesterday's citations impossible to explain. That changes the architecture more than the choice of vector database does. Short answer: use four observable stages — document intake, chunk preparation, collection upsert, and bounded query — with stable source metadata carried into every retrieved result. Keep ingestion and querying separate, and test freshness and relevance with representative PDFs before choosing a provider. The goal isn't a clever pipeline. It's an answer whose source can be traced. Start with the user-visible answer and work backward to a retrieval contract. For each result, the contract needs to identify the retrieval unit, the metadata available for filtering, the freshness rule, and the source context needed for a citation. A chunk is useful only if the dashboard can connect it to the PDF and the version that produced it. My first instinct with RAG is often to compare query features. Here, I would resist that. Incremental indexing fails at the boundary between an old document version and its replacement, so I would settle version identity and freshness before tuning retrieval. I'm not sure there is one ideal chunk size for financial PDFs; tables, footnotes, and narrative sections behave differently. Representative documents and known failure cases are what would resolve that uncertainty. Keep the query bounded. Apply the retrieval contract's metadata filters, ask for only the context the answer stage needs, and retain the returned source context rather than flattening everything into an anonymous text blob. This is less glamorous than prompt tuning. It also makes a stale citation diagnosable. Treat the pipeline as four independently observable stages. Intake recognizes a document version. Chunk preparation turns that version into retrieval units and attaches the metadata required by the dashboard. Upsert writes those units to an explicit collection. Query searches that collection under defined bounds and returns context that the answer layer can cite. | Stage | Input | Observable output | Failure question | |---|---|---|---| | Intake | A financial research PDF | A document and version identity | Did the system recognize a changed source? | | Chunk preparation | The recognized version | Retrieval units plus filter and citation metadata | Can every unit be traced back to its source context? | | Collection upsert | Prepared retrieval units | A completed write outcome | Did the intended version reach the collection? | | Bounded query | A question, collection, and filters | Retrieved source context | Are recall, precision, and freshness acceptable on representative documents? | This split matters during updates. Don't make the answer request responsible for discovering and repairing stale ingestion state. Record the outcome of each stage, then let the query stage consume only the collection state that the application considers current. A failed evaluation should point to intake, chunking, writing, or retrieval — not to an opaque "RAG quality" bucket. Chunking is the judgment-heavy part. A tiny retrieval unit may separate a table label from its values; an oversized one may bring unrelated passages into the answer context. I would build a small evaluation set from the actual document folder, include queries that should retrieve closely related passages, and include cases where a newer PDF supersedes an older one. Measure recall and precision against those cases. Don't tune against a clean demo document and assume the result transfers. The code below keeps the transport narrow: one verified write route and one verified query route. The request bodies come from environment variables because the provider's public discovery response supplies the full JSON Schema and runnable examples; copying an unverified field shape into an article would be worse DX than requiring explicit JSON. Every request declares its method, checks its status, and backs off on 429 . The write also requires an idempotency key so a retry can't apply the same incremental batch twice. js const apiKey = process.env.INFRAI API KEY; const apiBaseUrl = process.env.API BASE URL; const upsertBody = process.env.UPSERT BODY; const queryBody = process.env.QUERY BODY; const idempotencyKey = process.env.IDEMPOTENCY KEY; if apiKey || apiBaseUrl || upsertBody || queryBody || idempotencyKey { throw new Error "Set INFRAI API KEY, API BASE URL, UPSERT BODY, QUERY BODY, and IDEMPOTENCY KEY", ; } const sleep = milliseconds: number = new Promise