Mid-level interview questionAsked at Mistral AI · interview write-up
Using the Mistral API, how would you build a RAG agent end to end: ingestion, chunking, embeddings and retrieval?
Model answer
Ingest: parse documents to text, keep metadata like source, date and permissions, and split by structure into chunks of a few hundred tokens. Embed them in batches and store vectors with the metadata.
At query time, embed the question with the same model, retrieve the top k with filters, and give the chat model chunks with ids to cite. Make retrieval a tool, so the agent can search again with a rewritten query.
Practise the rest
22 RAG questions, 492 in all, each with a model answer. Free.
More from Mistral AI interview questions.
More RAG interview questions
- What is retrieval-augmented generation, and how does it reduce hallucination?
- How do you choose a chunking strategy for RAG?
- Why combine keyword and embedding search, and where does a reranker fit?
- How do you evaluate a RAG pipeline?
- Your RAG chatbot keeps giving wrong answers. How do you find out why, and fix it?
- Design a RAG system that has to meet strict latency and cost targets while serving many tenants.