You're viewing a demo portfolio

Join the waitlist
PRSM

build_rag_prompt

Active

Tool of IA-QA — 130+ QA & Dev Tools for AI Agents

declared in 1.0.0

Assemble a complete RAG (Retrieval-Augmented Generation) prompt from retrieved context chunks and a user query. Handles token budgeting, citation numbering, system instruction injection, and source attribution.

Parameters schema

{
  "type": "object",
  "required": [
    "query",
    "chunks"
  ],
  "properties": {
    "query": {
      "type": "string",
      "description": "The user question to answer"
    },
    "chunks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "score": {
            "type": "number"
          },
          "source": {
            "type": "string"
          }
        }
      },
      "description": "Retrieved context chunks with .text (required), .source (optional), .score (optional)"
    },
    "language": {
      "type": "string",
      "description": "Response language instruction (e.g. \"French\", \"Spanish\")"
    },
    "cite_sources": {
      "type": "boolean",
      "description": "Add [1], [2] citation numbers (default: true)"
    },
    "max_context_tokens": {
      "type": "number",
      "description": "Max tokens for context section (default: 2000)"
    },
    "system_instruction": {
      "type": "string",
      "description": "Custom system instruction (default: standard RAG grounding instruction)"
    }
  }
}

What this tool wraps· 0 endpoints

min confidence0.700.50

No endpoints wrapped at confidence ≥ 0.50.

Parent server

IA-QA — 130+ QA & Dev Tools for AI Agents

https://github.com/jcjamet/ia-qa

1/7 registries
View full server →