Skip to content
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

Agent search feature #3749

Merged
merged 163 commits into from
Feb 4, 2025
Merged

Agent search feature #3749

merged 163 commits into from
Feb 4, 2025

Conversation

pablonyx
Copy link
Contributor

@pablonyx pablonyx commented Jan 23, 2025

Description

https://linear.app/danswer/issue/DAN-1405/agentic-search

How Has This Been Tested?

Unit tested and extensively tested in the UI. Integration tests should follow at some point.

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

Copy link

vercel bot commented Jan 23, 2025

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

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 4, 2025 5:26am

@pablonyx pablonyx force-pushed the agent-search-feature branch from e00a6d0 to fa70770 Compare January 25, 2025 04:17
tool_call_chunk = AIMessageChunk(content="")
# for response in response_handler_manager.handle_llm_response(stream):

if final_search_results and displayed_search_results:
Copy link
Contributor

Choose a reason for hiding this comment

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

@yuhongsun96 we're using a CitationResponseHandler here, but using other code to handle agent search citations. A little unfortunate

Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably use the same style of objects at least, even if there is more than one of them for each case.

answer_piece = response.content
if not isinstance(answer_piece, str):
# TODO: handle non-string content
logger.warning(f"Received non-string content: {type(answer_piece)}")
Copy link
Contributor

Choose a reason for hiding this comment

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

@yuhongsun96 in several places we just assume the output is a string, let us know if you want any specific handling of unexpected types

Copy link
Contributor

Choose a reason for hiding this comment

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

If we're confident that in all our flows it's a string, you can just assert it

)
)

quality_str = merge_message_runs(response, chunk_separator="")[0].content
Copy link
Contributor

Choose a reason for hiding this comment

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

@yuhongsun96 Is this best practice for merging a list of streamed messages?

Copy link
Contributor

Choose a reason for hiding this comment

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

idk, I've never used this LangChain util. I mean it seems fine, you seem to be using it for the intended purpose.

Copy link
Contributor

@evan-danswer evan-danswer left a comment

Choose a reason for hiding this comment

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

Agent Search Beta ready!

@evan-danswer evan-danswer merged commit 91f0650 into main Feb 4, 2025
7 of 10 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.

4 participants