Sarah Anjou
  • Projects
  • Talks
  • Writing
Contact me
FR
  • Projects
  • Talks
  • Writing
  • Contact me
Sarah Anjou

© Sarah Anjou 2026. All rights reserved.

Projects

Aria | Querying your company’s documentation with RAG

March 2026·10 min read

  • Client collaboration
Contents
  • Preparing the documentation for search
  • Extracting the data
  • Vectorizing the data
  • Storing the data
  • Building sourced answers
  • Vectorizing the user’s question
  • Searching for information
  • Generating a sourced, verifiable answer
  • Knowing how to say “I don’t know”
  • Putting Aria to work for the teams
  • Querying documents in natural language through a chatbot
  • Prefilling questionnaires
  • Deploying Aria on the client’s infrastructure
  • Evaluating and improving Aria
  • Measuring the reliability of answers
  • Identifying knowledge to document
  • Making the cost of each answer visible

In many lines of work, teams still spend a large share of their time on repetitive, time-consuming tasks. Searching for information, going through documents, cross-checking data: all necessary activities which, piling up, sometimes leave little room for the work that fully draws on their expertise, creativity and judgment.

In January 2026, at the Chamonix entrepreneurship pitch competition, I meet the Head of Research and Innovation of an automotive equipment supplier. Present in 11 countries, the company today employs 3,500 people across 20 production sites and 4 R&D centers.

Every quarter, the company’s CSR department receives questionnaires from car manufacturers. To answer them, the teams have to find the information in their documentation, cross-check sources and write their answers. This work takes many hours for each questionnaire.

To free the teams from these searches, the Head of Research and Innovation, the CSR project manager and I come up with Aria, an internal platform whose goal is to go from documentation to knowledge, by making information directly queryable by employees.

To this end, Aria offers three complementary tools:

  • a document base to centralize and organize the company’s CSR documents;
  • a chatbot to query this documentation and get answers grounded in its content;
  • a module to prefill the CSR questionnaires sent by customers.

To write its answers, Aria relies on RAG (Retrieval-Augmented Generation). This method consists in searching the document base for the information relevant to a question, then passing it to the language model so that it writes an answer from these sources.

Aria What were our CO₂ emissions in 2025? carbon-report.pdf · p. 7
Figure 1. A sourced answer generated by Aria

Preparing the documentation for search

The company’s documentation is made up of PDF files. Perfectly readable for a human, these files can’t be used directly by a semantic search engine.

For Aria to find the passages relevant to each question, their content has to be extracted, vectorized and stored in a database. This is what we call indexing.

Extracting the data

For documents to be indexed, employees need to be able to upload them to the platform. Aria has a document management module for this, letting the CSR team keep its document base up to date.

HomeDocument baseAriaQuestionnaires Document base Add a PDF Search a title… StatusesTypesThemesLanguages TitleTypeStatusPagesChunksThemes CSR strategy 2023-2030FRPresentationIndexed1414csr+13Méthodologie ACV simplifiéeFRMethodologyIndexed66106lca+13Simplified LCA methodologyENMethodologyIndexed6684lca+14Eco-design roadmapFRPresentationIndexed2626eco-designPFAS regulations summaryFRReportIndexed1770pfas+4Carbon report 2024FRReportExtracting46–carbon
Figure 2. Document base management module

Each upload automatically triggers the extraction of the document’s content. What makes this extraction hard is the variety of layouts: columns, tables or boxes follow a reading order that is obvious to a human, but that the file doesn’t always describe.

The challenge is therefore to rebuild the document’s structure, in order to get an organized text, faithful to the original content, ready to be used by our system.

To do so, I use pdfplumber, combined with a spatial splitting algorithm (XY-cut), to identify the different areas of a page and rebuild their reading order. When some pages mostly contain images rather than text, a multimodal model takes over to extract their information.

PDF page Structured text 12345 pdfplumber+ XY-cut 1Title2Left column3Right column4Imagemultimodal model5Table
Figure 3. Structured extraction of a PDF page

Vectorizing the data

Now that the text is extracted and structured, it has to be made understandable to our search engine. The goal is to find a piece of information from its meaning, rather than from its exact wording.

For this, I choose to set up a semantic search system. It relies on vectorizing the data: each passage of text is turned into a numerical representation of its meaning, in the form of a vector.

To do so, I split the text into shorter passages, called chunks. In Aria, each chunk holds about 450 tokens. The split respects page boundaries and keeps the coordinates of the lines, to find the sources precisely in the PDFs.

Each chunk is then sent to OpenAI’s text-embedding-3-large model, which converts it into a numerical vector. In this vector space, texts expressing similar ideas tend to end up close to each other, even when they use different words or languages.

climate HR CO₂ emissionsENcarbon footprintENempreinte carboneFRpaid leaveENdays offEN
Figure 4. Chunks in the vector space

In addition, each chunk is also indexed by keywords with tsvector, to find precise references, such as the code of a standard. This indexing keeps words as they are, without reducing them to their root, to preserve acronyms and codes.

Storing the data

Our documents are now turned into passages of text, together with their vectors and keywords. This information now has to be stored and organized so it can be found quickly, while keeping the link to the original documents.

For this, I choose a PostgreSQL database with the pgvector extension. This brings the documents, their metadata, the chunks and their vectors together in a single database, without having to deploy a separate vector search engine.

The original PDFs stay stored on the server, while PostgreSQL keeps the information needed to use them. When a document is replaced, its old content is deleted and the new one reindexed, so that searches always rely on its latest version.

DocumentPageChunkVectorKeywords csr-report.pdf12[0.12 · …]scopeCO₂csr-report.pdf13[−0.31 · …]wastebuying-charter.pdf4[0.05 · …]ISO 14001 The original PDFs stay on the server: a replaced document is reindexed right away
Figure 5. Storing passages in PostgreSQL with pgvector

We now have a structured, indexed document base, ready to be queried by our search engine.

Building sourced answers

Once the documentation is indexed, RAG can come into play.

When a user asks a question in natural language, our system analyzes the request, then runs through the three steps of RAG:

  • finding the useful passages in the document base (Retrieval),
  • enriching the context sent to the model with these passages (Augmentation),
  • generating an answer from these elements, citing the sources used (Generation).

Vectorizing the user’s question

To be compared with the indexed passages, the question has to be vectorized too. It is therefore sent to an embedding model, which represents it in the same semantic space as the documents.

Searching for information

Vector search uses cosine similarity here to measure how close these vectors are. The higher this similarity, the more likely the texts they represent deal with the same subject.

To also find precise references, such as the code of a standard, I add a keyword search.

The results are then merged with RRF (Reciprocal Rank Fusion), which combines the rankings of both searches to bring out the most relevant passages.

VectorBADKeywordsACB RRF Final ranking A1B2C3D4
Figure 6. Hybrid search and rank fusion with RRF

Generating a sourced, verifiable answer

Once the relevant information is found, it remains to send it to a language model (LLM), together with the user’s question.

To make answers traceable, Aria asks the model to cite the passages it uses. These citations are then automatically checked against the original documents, to limit the risk of hallucinations.

RRetrievalFind the passagesAAugmentationAdd them to the questionGGenerationAnswer citing them Question What were our CO₂emissions in 2023? Retrieved passages 1 · csr-report.pdf, p. 12 2 · carbon-report.pdf, p. 7 Prompt sent to the LLM instruction: answer withthese passages, cite them + the question + passages 1 and 2 LLM Cited answer Scope 1 and 2emissions are detailedin the CSR report andthe carbon assessment. sources 1 2
Figure 7. The three steps of RAG

Thanks to the coordinates kept during extraction, each citation can be found and highlighted directly in the source PDF. Users can thus check the information visually, rather than relying solely on the generated answer.

Knowing how to say “I don’t know”

Citing sources isn’t enough: Aria also has to hold back when the documentation doesn’t contain the answer. For a questionnaire sent to a customer, no answer is better than an invented one.

Aria relies on several successive safeguards. Passages too far from the question are discarded with a similarity threshold. If no relevant passage is found, Aria says so without calling the language model. Any documentary answer generated without a citation is also turned into a refusal.

When the documentation touches on the subject without precisely answering the question, Aria explains what is missing and presents the closest information, with its sources.

Our system can now find the relevant information in the documentation, generate sourced, verifiable answers, and recognize the limits of what it knows.

Putting Aria to work for the teams

Now that our systems are built, we have to make them available to their main users: the company’s CSR team.

Querying documents in natural language through a chatbot

To find a piece of information quickly, every employee can query the company’s document base directly in natural language, in the chatbot named after the application, Aria. They get an answer along with its sources.

Each citation is clickable and opens the original PDF at the right page, with the matching passage highlighted.

HomeDocument baseAriaQuestionnaires What were our CO₂emissions in 2025? carbon-report.pdf · p. 7 carbon-report.pdfp. 7
Figure 8. Opening a citation in the source PDF

Prefilling questionnaires

To prefill a questionnaire, the CSR teams upload their Excel, Word or PDF file, and Aria identifies the questions and the fields to fill in.

Each suggested answer is submitted to the user, who can approve, edit or reject it. Only explicitly approved answers make it into the exported document. Without human input, the field stays empty. This approach lets the company make sure that the information sent to customers has been checked.

The document can then be exported in its original format.

HomeDocument baseAriaQuestionnaires client-questionnaire.xlsx4 questions Is the site ISO 14001 certified?iso-certificate.pdf · p. 1✓ ApprovedCO₂ emissions, scopes 1 and 2?carbon-report.pdf · p. 7✎ EditedShare of responsible purchasing?✕ RejectedWaste reduction policy?waste-policy.pdf · p. 2✓✎✕ Only approved answers will be exported · 1 field will stay blank Export as .xlsx
Figure 9. Prefilling a customer questionnaire

Aria is now available to the teams, who can query the documentation in natural language and prefill their customers’ questionnaires.

Deploying Aria on the client’s infrastructure

Beyond its features, Aria has to meet an important requirement from the client: being hosted on its internal infrastructure, so it keeps control over its data and the source code.

I therefore deploy the application on a private server, with Docker Compose. The architecture brings together a FastAPI API, a Next.js interface and a PostgreSQL database with pgvector.

Access is secured by Caddy, used as a reverse proxy, and authentication relies on Microsoft Entra ID SSO. Employees use their usual credentials, with permissions set according to their role.

SSO sign-in HTTPS Entra IDMicrosoft SSO Employeesbrowser Client’s private server · Docker Compose API calls off client server Caddyreverse proxy Next.jsinterface FastAPIAPI and workers PostgreSQLpgvector Filesoriginal PDFs Microsoft Foundryembeddings, LLM AccessApplicationData
Figure 10. Deployment architecture on the client’s infrastructure

The documents and indexed data are stored on the client’s infrastructure. The LLMs are called through Microsoft Foundry: these exchanges are subject to the platform’s data processing terms.

Custom-built, Aria is delivered with its source code and infrastructure, letting the client maintain and evolve it on its own.

The company now has an operational tool, in production on its infrastructure, ready to be used by its teams.

Evaluating and improving Aria

Once in service, Aria still has to prove itself. I therefore build in tools, available to administrators, to track the reliability of its answers, documentation gaps and costs.

Measuring the reliability of answers

A sourced answer isn’t necessarily a correct one. An automatic judge, itself a language model, checks that Aria’s statements are actually supported by the cited passages. Its verdicts have to be compared with human evaluations.

The CSR teams’ approvals also measure the share of suggestions accepted as is, and of those that need a correction.

Identifying knowledge to document

A question without an answer can reveal information missing from the documentation. Aria therefore tracks the share of these questions and writes an action plan every week: the documents to produce, their expected content and the questions they would unlock.

Making the cost of each answer visible

Aria counts the tokens consumed and shows the estimated financial cost of each answer, indexed document and questionnaire, along with an estimate of the energy used and the associated CO₂ emissions.


Aria’s value will be measured by the time the teams actually save, the reliability of its answers and the effort needed to check them. Some unanswered questions will reveal knowledge yet to be documented, opening up ways to enrich shared knowledge.

Document search is just one example among the many business processes that AI can simplify. Indeed, from one industry to another, skilled teams still spend hours on repetitive tasks.

Each simplified operation gives employees back time for the work where their expertise, creativity and human sensitivity truly make the difference. All of Aria’s ambition lies in this time regained and in what it makes possible.