ovinicius71/RAG — reverse-engineered prompt
Reverse engineered prompt
Build me a simple question answering backend that uses my own local documents as the source of truth. I want to drop text files into a docs folder, have the app split them into sensible chunks, create embeddings, store a fast searchable index, and then expose an API endpoint where I can send a question and get back an answer based only on the most relevant chunks from those files.
Please include the full flow from document ingestion to answering. Use a chat model for the final response, and also add a basic validation step so the app checks that the answer is actually close to the retrieved source content before returning it. If the question is empty, or the answer does not match the source well enough, return a clear error.
Make it easy to run locally with Python, include the setup needed, and keep the code organized and readable. You can look up current docs online if needed.
Want more depth? Deep Reverse