Alexandre Hennequin

Case study

RAG Chatbot That Drafts Word Documents

A RAG chatbot that answers questions from a document corpus and helps users draft structured Word documents from retrieved content.

Situation

A corporate client produced documents that drew heavily on a large internal corpus — every draft meant hours of gathering and reconciling source material.

Task

The client wanted a chatbot that could answer questions from the corpus and turn the retrieved content into a ready-to-edit Word document, reducing drafting time.

Action

I built a RAG chatbot with an interactive document-generation layer:

  • Retrieval: corpus chunked, embedded, and indexed in Qdrant; answers grounded in retrieved chunks.
  • Conversational drafting: the bot interacts with the user to structure the document — outline, sections, wording — before generating.
  • Word export: the final structure rendered into a formatted .docx via ONLYOFFICE, editable by the user.

Result

  • Drafting moved from a manual gather-and-reconcile process to an interactive, assisted workflow.
  • Users ended with an editable Word document, so output plugged straight into existing processes.

Confidentiality note

Client and corpus specifics stay general here.

Stack highlights

  • LangChain for retrieval and the conversational flow
  • Qdrant as the vector store
  • ONLYOFFICE for .docx generation
  • Python end to end