github SciPhi-AI/R2R v3.5.0

19 hours ago

R2R v3.5.0 Release Notes

We're excited to announce R2R v3.5.0, featuring our new Deep Research API and significant improvements to our RAG capabilities.

🚀 Highlights

  • Deep Research API: Multi-step reasoning system that fetches data from your knowledge base and the internet to deliver comprehensive, context-aware answers
  • Enhanced RAG Agent: More robust with new web search and scraping capabilities
  • Real-time Streaming: Server-side event streaming for visibility into the agent's thinking process and tool usage

✨ Key Features

Research Capabilities

  • Research Agent: Specialized mode with advanced reasoning and computational tools
  • Extended Thinking: Toggle reasoning capabilities with optimized Claude model support
  • Improved Citations: Real-time citation identification with precise source attribution

New Tools

  • Web Tools: Search external APIs and scrape web pages for up-to-date information
  • Research Tools: Reasoning, critique, and Python execution for complex analysis
  • RAG Tool: Leverage underlying RAG capabilities within the research agent

💡 Usage Examples

Basic RAG Mode

response = client.retrieval.agent(
    query="What does deepseek r1 imply for the future of AI?",
    generation_config={
        "model": "anthropic/claude-3-7-sonnet-20250219",
        "extended_thinking": True,
        "thinking_budget": 4096,
        "temperature": 1,
        "max_tokens_to_sample": 16000,
        "stream": True
    },
    rag_tools=["search_file_descriptions", "search_file_knowledge", "get_file_content", "web_search", "web_scrape"],
    mode="rag"
)

# Process the streaming events
for event in response:
    if isinstance(event, ThinkingEvent):
        print(f"🧠 Thinking: {event.data.delta.content[0].payload.value}")
    elif isinstance(event, ToolCallEvent):
        print(f"🔧 Tool call: {event.data.name}({event.data.arguments})")
    elif isinstance(event, ToolResultEvent):
        print(f"📊 Tool result: {event.data.content[:60]}...")
    elif isinstance(event, CitationEvent):
        print(f"📑 Citation: {event.data}")
    elif isinstance(event, MessageEvent):
        print(f"💬 Message: {event.data.delta.content[0].payload.value}")
    elif isinstance(event, FinalAnswerEvent):
        print(f"✅ Final answer: {event.data.generated_answer[:100]}...")
        print(f"   Citations: {len(event.data.citations)} sources referenced")

Research Mode

response = client.retrieval.agent(
    query="Analyze the philosophical implications of DeepSeek R1",
    generation_config={
        "model": "anthropic/claude-3-opus-20240229",
        "extended_thinking": True,
        "thinking_budget": 8192,
        "temperature": 0.2,
        "max_tokens_to_sample": 32000,
        "stream": True
    },
    research_tools=["rag", "reasoning", "critique", "python_executor"],
    mode="research"
)

For more details, visit our documentation site.

Don't miss a new R2R release

NewReleases is sending notifications on new releases.