Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

dkqjrm
Copy link
Contributor

@dkqjrm dkqjrm commented Jun 5, 2025

Problem/Issue

Identified minor grammatical inconsistencies in the docstring for generate_query in backend/src/agent/graph.py and a capitalization error in backend/src/agent/prompts.py. While not functional bugs, these issues can slightly reduce the clarity and professionalism of the codebase.

Specifically:

  • In backend/src/agent/graph.py, the docstring for generate_query used "generates a search queries" and "create an optimized search query" which are grammatically awkward.
  • In backend/src/agent/prompts.py, the instruction "you MUST include..." in answer_instructions started with a lowercase 'y'.

Solution/Changes

This PR addresses these minor grammatical issues and typos to improve clarity and consistency.

Changes in backend/src/agent/graph.py:

  • Corrected the docstring for generate_query to use plural "search queries" consistently.
// ... existing code ...
def generate_query(state: OverallState, config: RunnableConfig) -> QueryGenerationState:
    """LangGraph node that generates search queries based on the User's question.
    Uses Gemini 2.0 Flash to create optimized search queries for web research based on
    the User's question.
    // ... existing code ...
    Returns:
        Dictionary with state update, including search_query key containing the generated queries
    """
// ... existing code ...

Changes in backend/src/agent/prompts.py:

  • Capitalized the first letter of "you MUST" in answer_instructions.
// ... existing code ...
answer_instructions = """
// ... existing code ...
- You MUST include all the citations from the summaries in the answer correctly.
// ... existing code ...
"""

Benefits

  • Improved Readability: Enhances the clarity and professionalism of code comments, docstrings, and prompt instructions.
  • Grammatical Correctness: Ensures the text content adheres to standard English grammar.
  • Consistency: Aligns the language usage across different parts of the agent's codebase.

@philschmid philschmid merged commit 23f6aa5 into google-gemini:main Jun 18, 2025
1 check passed
rock913 pushed a commit to AutoBrainLab/gemini-fullstack-langgraph-quickstart that referenced this pull request Oct 11, 2025
fix(docs): Correct typos and grammatical inconsistencies in docstrings/prompts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.