← Questions

Build a RAG agent on the Mistral API, then defend its design

0
Mistral AIAI systemLast asked Jul 2026

Write a small Python tool that answers questions over a local folder of Markdown and PDF files with retrieval-augmented generation: ingest and chunk the files, embed and index the chunks, retrieve the best passages for a question, and call a Mistral chat model with streaming. Keep a short conversation memory, read the API key from the environment, and handle errors, retries and rate limits. Ship it with a README and a few smoke tests.

Then explain your choices: chunk size, embedding model, which vector index, the latency and cost budget, caching, prompt templates, handling personal data, logging, how you would evaluate retrieval offline, and what the agent does when retrieval finds nothing useful.

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing