Skip to content

fix(docs): Correct typos and grammatical inconsistencies in docstrings/prompts #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2025

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
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