OpenCoze
Back to template library

AI Agent Knowledge Retrieval & Summarization Workflow

OperationsCozeUpdated 2026-04-28

Quickly retrieve and summarize knowledge base content for AI agent development, boosting answer quality and response speed.

System Prompt
Receive user query {query}, search {knowledge_base_url} for relevant content, and return a summary in {output_format}.

Variable Dictionary (fill in your AI tool)

This section only explains placeholders. It is not an input form on this website. Copy the prompt, then replace variables in Coze / Dify / ChatGPT.

{query}

User's input query

Filling hint: replace this with your real business context.

{knowledge_base_url}

API endpoint or file path of the knowledge base

Filling hint: replace this with your real business context.

{output_format}

Desired output format, e.g., plain_text, markdown, or json

Filling hint: replace this with your real business context.

Quick Variable Filler (Optional)

Fill variables below to generate a ready-to-run prompt in your browser.

{query}

User's input query

{knowledge_base_url}

API endpoint or file path of the knowledge base

{output_format}

Desired output format, e.g., plain_text, markdown, or json

Generated Prompt Preview

Missing: 3
Receive user query {query}, search {knowledge_base_url} for relevant content, and return a summary in {output_format}.

How to Use This Template

Best for

Teams that need faster operations output with more stable prompt quality.

Problem it solves

Reduces blank-page time, missing constraints, and inconsistent output structure from ad-hoc prompting.

Steps

  1. Copy the template prompt.
  2. Paste it into your AI tool (Coze / Dify / ChatGPT).
  3. Replace placeholder variables using the dictionary above.
  4. Run and refine constraints based on output quality.

Not ideal when

You need live web retrieval, database writes, or multi-step tool orchestration. Use full workflow automation for that.

Success Case

Input:
Explain the difference between supervised and unsupervised learning
Output:
Supervised learning trains a model on labeled data to predict labels, while unsupervised learning finds patterns or structure in unlabeled data.

Boundary Case

Input:
Fix:
Provide a valid query string.

What to Try Next

Keep exploring with similar templates and matching tools.

Continue Where You Left Off

No recent items yet.

Workflow Steps

  1. 1. Receive and validate {query}, ensuring it is non-empty and <= 500 characters.

  2. 2. Call the knowledge base search API with {query} to retrieve related documents.

  3. 3. Aggregate and summarize the retrieved results, extracting key points.

  4. 4. Format the final answer in {output_format} and return to the user.

Constraints

  • Query exceeds 500 characters
  • Knowledge base API is down

Explore More in This Category

Operations