R2R icon indicating copy to clipboard operation
R2R copied to clipboard

Feature/pydantic ai

Open nPeppon opened this issue 6 months ago • 0 comments

🚧 Prototype: Adoption of Pydantic AI Framework

This PR introduces a preliminary integration of the Pydantic AI framework as a proof of concept to explore its adoption within our system.

🔎 Overview

  • Integrated a dummy tool leveraging the Pydantic AI framework.
  • Tested framework extendibility and compatibility with our existing architecture.
  • Code is currently rough and experimental, not production-ready.

⚠️ Important Notes

  • The implementation is not clean and serves mainly as a sandbox to validate ideas.
  • No full refactoring or optimization has been applied yet.
  • This is a starting point for further proper implementation.

🎯 Goals

  • Assess how Pydantic AI can integrate in current workflow.
  • Understand integration challenges and extendibility of the framework.
  • Lay groundwork for a cleaner, robust adoption.

🚀 Next Steps

  • Refine the integration with a clean, maintainable design.
  • Expand test coverage and validation.
  • Collaborate with the team to finalize and roll out properly.

Feel free to take this prototype forward and build a solid implementation based on it!


[!IMPORTANT] Prototype integration of Pydantic AI framework with new RAGPydAgent and tools for enhanced search capabilities.

  • Behavior:
    • Introduces RAGPydAgent in rag_pyd.py to integrate Pydantic AI framework.
    • Adds smart_filter_tool and other tools in tools/built_in to refine search capabilities.
    • Updates retrieval_router.py and retrieval_service.py to support rag_pyd mode.
  • Prompts:
    • Updates prompts in dynamic_rag_agent.yaml, dynamic_rag_agent_xml_tooling.yaml, static_rag_agent.yaml, and static_research_agent.yaml to include instructions for using new tools.
  • Misc:
    • Adds pydantic-ai==0.2.16 to pyproject.toml dependencies.
    • Updates SearchSettings and AggregateSearchResult in search.py to handle new search results.

This description was created by Ellipsis for 32caecf9a2383fee240a05403f89be66ea31c74c. You can customize this summary. It will automatically update as commits are pushed.

nPeppon avatar Jun 11 '25 07:06 nPeppon