Skip to content

Conversation

joachim-danswer
Copy link
Contributor

@joachim-danswer joachim-danswer commented Jul 10, 2025

Description

  • Integrate for KG Beta Assistant Basic Search and KG Search (sans history)
  • Prep Deep Research flow concepts

How Has This Been Tested?

locally in multi-tenant environment

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

@joachim-danswer joachim-danswer requested a review from a team as a code owner July 10, 2025 18:14
Copy link

vercel bot commented Jul 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Project Deployment Preview Comments Updated (UTC)
internal-search Ready Preview Comment Aug 12, 2025 4:52pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Initial Deep Research (DR) implementation that unifies knowledge graph and basic search flows, introducing a new decision-based routing system for query processing.

  • Added new TimeBudget enum in backend/onyx/agents/agent_search/models.py to configure search depth with FAST/SHALLOW/DEEP options, laying groundwork for more sophisticated research capabilities
  • Implemented decision routing in backend/onyx/agents/agent_search/dr/nodes/dr_a1_orchestrator.py that dynamically chooses between search or knowledge graph paths, but lacks proper error handling for non-FAST time budgets
  • Enhanced search result handling in backend/onyx/agents/agent_search/basic/models.py with new BasicSearchProcessedStreamResults for better structure of answers and citations
  • Changed KB search in backend/onyx/agents/agent_search/kb_search/nodes/d1_generate_answer.py to properly capture final answers, but some paths lack test coverage
  • Replaced KB graph with DR graph in backend/onyx/chat/answer.py, using temporary TMP_DRALPHA_PERSONA_NAME constant suggesting transitional implementation

23 files reviewed, 32 comments
Edit PR Review Bot Settings | Greptile

Comment on lines 65 to 67
return BasicSearchProcessedStreamResults(
ai_message_chunk=cast(AIMessageChunk, tool_call_chunk),
full_answer=full_answer,
cited_references=[],
retrieved_documents=[],
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: cited_references and retrieved_documents are always empty lists. Consider populating from final_search_results if available

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with greptile, either these should be populated or the fields should be removed (if you never use them later)

Copy link
Contributor

@evan-onyx evan-onyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first pass

Comment on lines 65 to 67
return BasicSearchProcessedStreamResults(
ai_message_chunk=cast(AIMessageChunk, tool_call_chunk),
full_answer=full_answer,
cited_references=[],
retrieved_documents=[],
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with greptile, either these should be populated or the fields should be removed (if you never use them later)

Comment on lines 38 to 95
Here are the entity types that are available in the knowledge graph:
{SEPARATOR_LINE}
---possible_entities---
{SEPARATOR_LINE}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you're doing two distinct rounds of substitution, I do think it's fair to do something like {{possible_entities}} instead of the raw string replace

@Orbital-Web Orbital-Web changed the title Dr v0 - initial work to unify flows and set up for Deep Research feat: Dr v0 - initial work to unify flows and set up for Deep Research Jul 18, 2025
@github-actions github-actions bot added the feat label Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants