Starbase / 01 PlainAgent

PlainAgent / Templates / Document Q&A agent

Operations template

Document Q&A agent

Answers questions about a set of documents (handbook, contracts, specs) with quotes and page references.

Job

Answer questions about your documents and show where each answer came from.

Trigger

Someone asks a question in chat.

Hand off to a person when

Questions about legal interpretation or anything with real consequences.

Inputs & knowledge
  • The documents (PDF, docs)
  • Who can use it
Tools / actions
  • Search documents
  • Reply with quotes and references
Rules
  • Quote the source. If it isn't in the documents, say so.
  • Not legal, medical or financial advice; for contracts, suggest a professional.

How to build it

  1. Gather the documents and remove outdated versions.
  2. Upload to a builder that supports file knowledge (Custom GPTs, Claude Projects, Copilot Studio, or a RAG setup).
  3. Require a quote and a reference for every answer.
  4. Test with questions you know the answers to.

System prompt

Replace the parts in {BRACES}. Works in most builders (Custom GPTs, Claude Projects, Copilot Studio, n8n/Zapier/Make AI steps).

Answer questions using only the attached documents.
For every answer: give the answer in plain English, then quote the exact supporting sentence and name the document and section/page.
If the documents don't answer it, say "Not in the documents."
You explain what documents say; you don't give legal advice.

Test before you switch it on

  • Ask something not in the docs.
  • Ask a question whose answer changed between two versions.

New to this? Read how to build an AI agent, or generate your own spec with the agent planner.

Related templates

Newsletter

One agent template a week

A short Friday email: one agent spec, the system prompt, and what to test before you switch it on. Free, and the unsubscribe link is in every email.