-
Notifications
You must be signed in to change notification settings - Fork 100
Add the new Agent Powered Retrieval notebook #253
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
base: main
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@@ -0,0 +1,1200 @@ | |||
{ |
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.
if len(retrieved_documents.get("documents")) > top_k:
can be removed.
retrieved_documents["documents"] = retrieved_documents["documents"][:top_k]
should always work if top_k
is an integer
Reply via ReviewNB
@@ -0,0 +1,1200 @@ | |||
{ |
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.
Line #6. top_k: Optional[int] = 5
Optional[int]
means Union[int, None]
.
Since the function breaks if top_k
is None
, I would use top_k: int=5
Reply via ReviewNB
@@ -0,0 +1,1200 @@ | |||
{ |
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.
As far as I can understand, here we are using the JSON schema mostly to accurately describe the metadata_filters
that we consider valid in this case. Right? If so, I'd add that in several other cases, you don't need to manually specify the JSON schema but can use @tool/create_tool_from_function
Reply via ReviewNB
Nice! Left some comments. |
Uh oh!
There was an error while loading. Please reload this page.