Skip to content
UsecaseBoard
← All use cases
hackernewsDocument Q&A

Review retrieved document excerpts before sending them to a model

At a glance

RAG-Guard's Show HN project demonstrates document Q&A with a manual approval step for retrieved text. This workflow is listed under Document Q&A, Local AI, Human Review.

SourceBuilding a tool for these workflows? See weekly rates.

What they did

1) Have Docker Desktop and a running Ollama endpoint with llama3.2 available. Clone https://github.com/mrorigo/rag-guard.git, enter rag-guard and run ./build.sh. 2) Start the image with port 8000 mapped. For a local Ollama setup, the linked README uses: docker run -p 8000:8000 -e OPENAI_BASE_URL=http://host.docker.internal:11434/v1 -e OPENAI_MODEL=llama3.2 rag-guard. The Ollama endpoint must be reachable from the container. 3) Open http://localhost:8000 and add a .txt or .md document. The browser parses, embeds and searches its text. 4) Ask a document question and inspect the retrieved excerpts. Select and approve only the chunks you want passed to the configured model. 5) Send the approved context and read the returned answer, comparing it with those excerpts.

Worth knowing

The author calls it experimental. The linked implementation supports TXT and Markdown; PDF and DOCX support appear on its future-work list.

Save ideas in this browser. Upvotes count across the board.

Prompt excerpt

No prompt excerpt was provided by the source.

Sponsored

CodeBuddy

Tencent Cloud AI coding assistant for IDE and CLI.

Try CodeBuddy ↗
Explore all →