Skip to content

Feat/agent knowledge graph tool#15

Merged
shilpamusale merged 9 commits into
mainfrom
feat/agent-knowledge-graph-tool
Sep 6, 2025
Merged

Feat/agent knowledge graph tool#15
shilpamusale merged 9 commits into
mainfrom
feat/agent-knowledge-graph-tool

Conversation

@shilpamusale

Copy link
Copy Markdown
Owner

No description provided.

This commit introduces a major new capability to the agentic system by adding a KnowledgeGraphTool. This tool allows the agent to query a Neo4j database, enabling it to answer complex, relational questions that are impossible for a standard RAG pipeline to handle.

Key changes include:
- Created a  class with a Text-to-Cypher module powered by .
- Engineered a robust prompt with schema, rules, and few-shot examples to guide the LLM's query generation.
- Implemented a Pydantic schema for tool inputs to ensure reliable argument passing from the manager agent.
- Upgraded the  agent's prompt to enable intelligent routing between the RAG tool and the new Knowledge Graph tool.
- Added a  entry point for running the agent and systematically tested all reasoning paths.
- Refactored the core agent logic to manage secrets via a  file and to ensure explicit API key configuration for all LLM clients.
This commit introduces a major new capability to the agentic system by adding a KnowledgeGraphTool. This tool allows the agent to query a Neo4j database, enabling it to answer complex, relational questions that are impossible for a standard RAG pipeline to handle.

Key changes include:
- Created a  class with a Text-to-Cypher module powered by .
- Engineered a robust prompt with schema, rules, and few-shot examples to guide the LLM's query generation.
- Implemented a Pydantic schema for tool inputs to ensure reliable argument passing from the manager agent.
- Upgraded the  agent's prompt to enable intelligent routing between the RAG tool and the new Knowledge Graph tool.
- Added a  entry point for running the agent and systematically tested all reasoning paths.
- Refactored the core agent logic to manage secrets via a  file and to ensure explicit API key configuration for all LLM clients.
This commit introduces a major new capability to the agentic system by adding a KnowledgeGraphTool. This tool allows the agent to query a Neo4j database, enabling it to answer complex, relational questions that are impossible for a standard RAG pipeline to handle.

Key changes include:
- Created a  class with a Text-to-Cypher module powered by .
- Engineered a robust prompt with schema, rules, and few-shot examples to guide the LLM's query generation.
- Implemented a Pydantic schema for tool inputs to ensure reliable argument passing from the manager agent.
- Upgraded the  agent's prompt to enable intelligent routing between the RAG tool and the new Knowledge Graph tool.
- Added a  entry point for running the agent and systematically tested all reasoning paths.
- Refactored the core agent logic to manage secrets via a  file and to ensure explicit API key configuration for all LLM clients.
This commit introduces a major new capability to the agentic system by adding a KnowledgeGraphTool. This tool allows the agent to query a Neo4j database, enabling it to answer complex, relational questions that are impossible for a standard RAG pipeline to handle.

Key changes include:
- Created a  class with a Text-to-Cypher module powered by .
- Engineered a robust prompt with schema, rules, and few-shot examples to guide the LLM's query generation.
- Implemented a Pydantic schema for tool inputs to ensure reliable argument passing from the manager agent.
- Upgraded the  agent's prompt to enable intelligent routing between the RAG tool and the new Knowledge Graph tool.
- Added a  entry point for running the agent and systematically tested all reasoning paths.
- Refactored the core agent logic to manage secrets via a  file and to ensure explicit API key configuration for all LLM clients.
This commit introduces a major new capability to the agentic system by adding a KnowledgeGraphTool. This tool allows the agent to query a Neo4j database, enabling it to answer complex, relational questions that are impossible for a standard RAG pipeline to handle.

Key changes include:
- Created a  class with a Text-to-Cypher module powered by .
- Engineered a robust prompt with schema, rules, and few-shot examples to guide the LLM's query generation.
- Implemented a Pydantic schema for tool inputs to ensure reliable argument passing from the manager agent.
- Upgraded the  agent's prompt to enable intelligent routing between the RAG tool and the new Knowledge Graph tool.
- Added a  entry point for running the agent and systematically tested all reasoning paths.
- Refactored the core agent logic to manage secrets via a  file and to ensure explicit API key configuration for all LLM clients.
This commit introduces a major new capability to the agentic system by adding a KnowledgeGraphTool. This tool allows the agent to query a Neo4j database, enabling it to answer complex, relational questions that are impossible for a standard RAG pipeline to handle.

Key changes include:
- Created a  class with a Text-to-Cypher module powered by .
- Engineered a robust prompt with schema, rules, and few-shot examples to guide the LLM's query generation.
- Implemented a Pydantic schema for tool inputs to ensure reliable argument passing from the manager agent.
- Upgraded the  agent's prompt to enable intelligent routing between the RAG tool and the new Knowledge Graph tool.
- Added a  entry point for running the agent and systematically tested all reasoning paths.
- Refactored the core agent logic to manage secrets via a  file and to ensure explicit API key configuration for all LLM clients.
This commit introduces a major new capability to the agentic system by adding a KnowledgeGraphTool. This tool allows the agent to query a Neo4j database, enabling it to answer complex, relational questions that are impossible for a standard RAG pipeline to handle.

Key changes include:
- Created a  class with a Text-to-Cypher module powered by .
- Engineered a robust prompt with schema, rules, and few-shot examples to guide the LLM's query generation.
- Implemented a Pydantic schema for tool inputs to ensure reliable argument passing from the manager agent.
- Upgraded the  agent's prompt to enable intelligent routing between the RAG tool and the new Knowledge Graph tool.
- Added a  entry point for running the agent and systematically tested all reasoning paths.
- Refactored the core agent logic to manage secrets via a  file and to ensure explicit API key configuration for all LLM clients.
Refactored the settings management to use a 'lazy' function-based
approach () instead of an 'eager' global constant.

This was necessary to resolve a persistent  in the pytest
environment where tests were failing during collection. The eager check
for the API key was preventing any tests from running without credentials.

This change decouples the application modules from the need for a globally
available API key, making the entire system more modular and testable.
Added a patch to mock the get_google_api_key function.
This fully isolates the unit test from needing real credentials,
resolving the final test failure in the CI environment.
@shilpamusale shilpamusale merged commit 36f09c0 into main Sep 6, 2025
3 checks 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.

1 participant