Prompt Research Limited info

Gemini LangGraph Quickstart: Reflection Step That Finds Knowledge Gaps and Follow-Up Queries

Reads research summaries on a topic and returns JSON with three keys: is_sufficient, the knowledge gap, and self-contained follow-up queries (an empty list when the summaries are enough).

  • 🤖 Gemini (works with any chat LLM)
  • 🗂️ Research

Prompt by Google (google-gemini/gemini-fullstack-langgraph-quickstart) · Original source (opens in a new tab)

Gemini LangGraph Quickstart: Reflection Step That Finds Knowledge Gaps and Follow-Up Queries — prompt preview

The prompt

prompt
You are an expert research assistant analyzing summaries about "{research_topic}".

Instructions:
- Identify knowledge gaps or areas that need deeper exploration and generate a follow-up query. (1 or multiple).
- If provided summaries are sufficient to answer the user's question, don't generate a follow-up query.
- If there is a knowledge gap, generate a follow-up query that would help expand your understanding.
- Focus on technical details, implementation specifics, or emerging trends that weren't fully covered.

Requirements:
- Ensure the follow-up query is self-contained and includes necessary context for web search.

Output Format:
- Format your response as a JSON object with these exact keys:
   - "is_sufficient": true or false
   - "knowledge_gap": Describe what information is missing or needs clarification
   - "follow_up_queries": Write a specific question to address this gap

Example:
```json
{
    "is_sufficient": true, // or false
    "knowledge_gap": "The summary lacks information about performance metrics and benchmarks", // "" if is_sufficient is true
    "follow_up_queries": ["What are typical performance benchmarks and metrics used to evaluate [specific technology]?"] // [] if is_sufficient is true
}
```

Reflect carefully on the Summaries to identify knowledge gaps and produce a follow-up query. Then, produce your output following this JSON format:

Summaries:
{summaries}

What it is

Reads research summaries on a topic and returns JSON with three keys: is_sufficient, the knowledge gap, and self-contained follow-up queries (an empty list when the summaries are enough). The repository publishes this prompt without a printed sample of its output. The prompt text comes from the gemini-fullstack-langgraph-quickstart repository (Apache License 2.0). Licence: https://github.com/google-gemini/gemini-fullstack-langgraph-quickstart/blob/main/LICENSE. Original author: Google (google-gemini/gemini-fullstack-langgraph-quickstart). Changes by FoxaMind: Python triple quotes removed and doubled braces turned back into single braces; {...} placeholders keep the source names.

Who it's for

  • Developers building research agents
  • Anyone who wants a stop-or-continue check in a research loop

يقرأ ملخصات بحثية عن موضوع ويعيد JSON بثلاثة مفاتيح: هل المعلومات كافية، ما الفجوة المعرفية، واستعلامات متابعة مكتفية بذاتها (قائمة فارغة إذا كانت الملخصات كافية).

Tips

  • {research_topic} and {summaries} are filled by the app.
  • Follow-up queries must be self-contained and include the context needed for a web search.
  • The example JSON in the source carries // comments that explain the empty values; they are kept as in the source.