-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
feat: websearch, tool use, user intent, dynamic retrieval, multiple questions #3424
Merged
AmineDiro
merged 26 commits into
main
from
feat/edit_system_prompt_from_conversation_UPDATED
Oct 31, 2024
Merged
feat: websearch, tool use, user intent, dynamic retrieval, multiple questions #3424
AmineDiro
merged 26 commits into
main
from
feat/edit_system_prompt_from_conversation_UPDATED
Oct 31, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dosubot
bot
added
the
size:XXL
This PR changes 1000+ lines, ignoring generated files.
label
Oct 24, 2024
jacopo-chevallard
force-pushed
the
feat/edit_system_prompt_from_conversation_UPDATED
branch
from
October 24, 2024 14:46
27b1d1b
to
5401c01
Compare
…rompt_from_conversation branch. commit fb6c4d5 Author: Jacopo Chevallard <[email protected]> Date: Wed Oct 9 12:06:23 2024 +0200 feat: starting reorganizing modules for simpler maintenance and readability commit 47130fc Author: Jacopo Chevallard <[email protected]> Date: Wed Oct 9 11:12:30 2024 +0200 feat: improving prompt commit 4a42c7e Author: Jacopo Chevallard <[email protected]> Date: Tue Oct 8 15:26:53 2024 +0200 feat: forcing reasoning via structured output, starting refacto to simplify code logics and maintenability commit d662bf1 Author: Jacopo Chevallard <[email protected]> Date: Tue Oct 8 15:24:15 2024 +0200 fix: passing temperature parameter to the LLM constructors commit ac372ed Author: Jacopo Chevallard <[email protected]> Date: Tue Oct 8 15:23:32 2024 +0200 feat: improving prompts commit 27d4ca9 Author: Jacopo Chevallard <[email protected]> Date: Mon Oct 7 18:35:56 2024 +0200 feat: making some methods more generic, so that they can be applied to different types of tools commit 53a6483 Author: Jacopo Chevallard <[email protected]> Date: Mon Oct 7 18:34:58 2024 +0200 feat: improving prompts commit cdf4d49 Author: Jacopo Chevallard <[email protected]> Date: Mon Oct 7 18:00:25 2024 +0200 feat: using gpt-4o as the default model commit 355835f Author: Jacopo Chevallard <[email protected]> Date: Fri Oct 4 19:07:55 2024 +0200 feat: typing the response for structured output commit 564ee37 Author: Jacopo Chevallard <[email protected]> Date: Fri Oct 4 19:06:34 2024 +0200 feat: progressing with the ability for the system to activate available tools to solve users' tasks commit 0c9e224 Author: Jacopo Chevallard <[email protected]> Date: Thu Oct 3 16:37:47 2024 +0200 feat: adding filename to the chunk formatting prompt commit 60a3081 Author: Jacopo Chevallard <[email protected]> Date: Thu Oct 3 16:25:22 2024 +0200 feat: simplifying tool categories handling and tools creation commit 670092f Author: Jacopo Chevallard <[email protected]> Date: Thu Oct 3 15:52:35 2024 +0200 refacto: AnsweredQuestions --> TasksCompletion commit e0b1d1a Author: Jacopo Chevallard <[email protected]> Date: Thu Oct 3 15:52:07 2024 +0200 feat: laying the ground to enable passing a list of available tools/nodes that can be activated by the user via prompting commit 32cb677 Author: Jacopo Chevallard <[email protected]> Date: Thu Oct 3 14:41:09 2024 +0200 feat: allowing arbitrary configuration keywords to be passed to the Tavily tool constructor commit 22af59b Author: Jacopo Chevallard <[email protected]> Date: Thu Oct 3 14:26:50 2024 +0200 feat: correctly passing the api key for Tavily commit 776919d Author: Jacopo Chevallard <[email protected]> Date: Thu Oct 3 14:14:20 2024 +0200 feat: better structuring the LLM tools configuration, instantiation and binding commit c6af21d Author: Jacopo Chevallard <[email protected]> Date: Thu Oct 3 10:58:56 2024 +0200 feat: correctly parsing and combining citations and followup questions when multiple user questions (and thus multiple model answers) are present commit f412fc3 Author: Jacopo Chevallard <[email protected]> Date: Thu Oct 3 10:57:51 2024 +0200 feat: improving prompt for tasks/instructions splitting commit 7242fe5 Author: Jacopo Chevallard <[email protected]> Date: Wed Oct 2 18:08:06 2024 +0200 fix: fixing check presence of START node commit 02675df Author: Jacopo Chevallard <[email protected]> Date: Wed Oct 2 17:55:27 2024 +0200 fix: including forgotten new module commit 1937899 Author: Jacopo Chevallard <[email protected]> Date: Wed Oct 2 17:52:35 2024 +0200 feat: improving prompts commit ef05824 Author: Jacopo Chevallard <[email protected]> Date: Wed Oct 2 17:52:03 2024 +0200 fix: fixing errors when the cited_answer tool is not present among the tools called commit 5896f03 Author: Jacopo Chevallard <[email protected]> Date: Wed Oct 2 17:51:10 2024 +0200 feat: laying the ground for a more flexible association of tools (and their configurations) to workflow nodes commit 928f576 Author: Jacopo Chevallard <[email protected]> Date: Wed Oct 2 15:16:02 2024 +0200 refactor: changing questions into tasks, as user inputs are not always questions commit f732184 Author: Jacopo Chevallard <[email protected]> Date: Wed Oct 2 15:15:12 2024 +0200 feat: merging the question/instructions routing prompt/node with the question rephrasing ones commit e197a49 Author: Jacopo Chevallard <[email protected]> Date: Wed Oct 2 11:21:59 2024 +0200 feat: improving prompt formatting commit 7ebc410 Author: Jacopo Chevallard <[email protected]> Date: Tue Oct 1 17:20:49 2024 +0200 fix: fixing nodes behaviours when no user questions / tasks are present (i.e., when the user is only providing system instructions) commit 1627193 Author: Jacopo Chevallard <[email protected]> Date: Tue Oct 1 17:13:18 2024 +0200 feat: improving prompts commit 16f710c Author: Jacopo Chevallard <[email protected]> Date: Tue Oct 1 16:38:19 2024 +0200 feat: added nodes and routers for web search, based on Tavily commit d0ac9b3 Author: Jacopo Chevallard <[email protected]> Date: Tue Oct 1 13:24:41 2024 +0200 fix: fixing returned chunks (sources), whose list can be modified during the last step (generation) in order to fit into the user-defined maximum context window commit 1732986 Author: Jacopo Chevallard <[email protected]> Date: Tue Oct 1 13:23:06 2024 +0200 fix: fixing chat-with-llm mode commit 42ed087 Author: Jacopo Chevallard <[email protected]> Date: Tue Oct 1 12:55:17 2024 +0200 feat: introduced node for dynamic chunk retrieval; enforcing the context passed to the LLM for the final answer generation to be at most max_context_tokens commit 1aa27e1 Author: Jacopo Chevallard <[email protected]> Date: Tue Oct 1 12:50:00 2024 +0200 feat: making the construction of env variable names more robust commit 63657f4 Author: Jacopo Chevallard <[email protected]> Date: Mon Sep 30 18:12:34 2024 +0200 feat: enable filtering the reranked chunks by their relevance score commit 31d91ec Author: Jacopo Chevallard <[email protected]> Date: Mon Sep 30 18:11:24 2024 +0200 fix: ensuring that the signature of 'similarity_search' in CustomSupabaseVectorStore matches the signature of the same method in its parent class commit 3d97994 Author: Jacopo Chevallard <[email protected]> Date: Mon Sep 30 11:25:12 2024 +0200 refacto: renaming max_input --> max_context_tokens (also in the db, SQL migration script is included) commit d033772 Author: Jacopo Chevallard <[email protected]> Date: Mon Sep 30 10:04:44 2024 +0200 refactor: changing soruce to docs for clarity commit 7acb034 Author: Jacopo Chevallard <[email protected]> Date: Fri Sep 27 12:27:46 2024 +0200 feat: enabling questions/instructions identification, multi-question parallel retrieval, more robust outputs thanks to structured outputs commit f5ff497 Author: Jacopo Chevallard <[email protected]> Date: Fri Sep 27 12:16:06 2024 +0200 feat: improving prompts and adding chat history to RAG-generation prompt commit 90635de Author: Jacopo Chevallard <[email protected]> Date: Fri Sep 27 10:52:53 2024 +0200 feat: dealing with the different types of conditional edges, where some conditional edges can exploit the new LangGraph Send API commit d4bb94e Author: Jacopo Chevallard <[email protected]> Date: Wed Sep 25 17:00:28 2024 +0200 feat: enabling the user to modify the system prompt during a conversation commit cd5da57 Author: Jacopo Chevallard <[email protected]> Date: Wed Sep 25 16:59:00 2024 +0200 feat: dealing with the special LangGraph edges START and END within the Pydantic classes commit 778e03e Author: Jacopo Chevallard <[email protected]> Date: Tue Sep 24 14:31:30 2024 +0200 feat: removing sync versions of several functions to simplify code maintenance and accelerate developments
Author: Jacopo Chevallard <[email protected]> Date: Wed Oct 9 12:06:23 2024 +0200 feat: starting reorganizing modules for simpler maintenance and readability
Author: Jacopo Chevallard <[email protected]> Date: Wed Oct 9 12:06:23 2024 +0200 feat: starting reorganizing modules for simpler maintenance and readability commit 3d97994 Author: Jacopo Chevallard <[email protected]> Date: Mon Sep 30 11:25:12 2024 +0200 refacto: renaming max_input --> max_context_tokens (also in the db, SQL migration script is included)
StanGirard
requested changes
Oct 24, 2024
…ule; explicitly configuring the deafult LLM to prevent LLMEndpointConfig errors when importing the modules (because of checks of the presence of env variables)
…ing an error anymore if the API key is not set at construction time
… we assume that models by default support function calling, unless they appear in the list of models NOT supporting it
@AmineDiro @StanGirard all tests are passing by now |
…ionary passed to RAG_ANSWER_PROMPT
AmineDiro
reviewed
Oct 31, 2024
AmineDiro
reviewed
Oct 31, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work on the PR 💯 !
Here are some feedback on the design and current architecture of the classes:
- I think that the
QuivrQARAGLangGraph
should get leaner: it has method that don't directly operate on self. It should offload to some node and only hold a the graph itself: how to build the graph, how to run the graph , how to print the graph .... - The state inside the graph should be typed. Coming from the outside It is very difficult to debug the state inside a node. Currently the state is passed as dict between nodes.
One approach would be to use the TypeState pattern : The Object state can be generic over the some transitionStatteType State<T> where T
. Then on each transition we could have a new object State than is correctly typed and holds a list of predetermined attributes that are clear to the IDE, debugger etc ... - The tools interface should be cleanup a bit. IMO the registry pattern is the correct abstraction here but I think that some abstraction like ToolWrapper, Tools, create_tool_... are not necessary and could be simplified. We should have a common interface over Tools as some abstract class and then build each tool class internal to quiver as its own object that can be added to the registry if its key matches the config key.
- The prompts interface should probably adhere to the registry pattern.
AmineDiro
approved these changes
Oct 31, 2024
StanGirard
approved these changes
Oct 31, 2024
AmineDiro
deleted the
feat/edit_system_prompt_from_conversation_UPDATED
branch
October 31, 2024 16:57
StanGirard
added a commit
that referenced
this pull request
Oct 31, 2024
🤖 I have created a release *beep* *boop* --- ## [0.0.23](core-0.0.22...core-0.0.23) (2024-10-31) ### Features * websearch, tool use, user intent, dynamic retrieval, multiple questions ([#3424](#3424)) ([285fe5b](285fe5b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR includes far too many new features:
Also closes CORE-205
Checklist before requesting a review
Please delete options that are not relevant.
Screenshots (if appropriate):