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

for ChatVectorDBChain, add top_k_docs_for_context to allow control how many chunks of context will be retrieved #1155

Merged
merged 5 commits into from Feb 20, 2023

Conversation

AlexZhangji
Copy link
Contributor

given that we allow user define chunk size, think it would be useful for user to define how many chunks of context will be retrieved.

have done similar project (youtube summarization and question answeirng).

I find that youtube video meta infor, especially video title and descriptions are quite helpful for LLM to better understand the context.

and similarly, thumbnail image url can be useful when build web app with this.

a sample output would be
{'source': 'I845O57ZSy4',
 'title': 'John Carmack: Doom, Quake, VR, AGI, Programming, Video Games, and Rockets | Lex Fridman Podcast langchain-ai#309',
 'description': 'John Carmack is a legendary programmer, co-founder of id Software, and lead programmer of many revol...',
 'view_count': 1229347,
 'thumbnail_url': 'https://i.ytimg.com/vi/I845O57ZSy4/sddefault.jpg',
 'publish_date': datetime.datetime(2022, 8, 4, 0, 0),
 'length': 18890,
 'author': 'Lex Fridman',
}

Love the work you guys have done on LangChain, hope i can also contribute a tiny bit!
…ntext will be retrieved

given that we allow user define chunk size, think it would be useful for user to define how many chunks of context will be retrieved. or the default 4 chunk can break some code.
Copy link
Contributor

@hwchase17 hwchase17 left a comment

Choose a reason for hiding this comment

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

thanks!

@hwchase17 hwchase17 merged commit ed37fba into langchain-ai:master Feb 20, 2023
@blob42 blob42 mentioned this pull request Feb 21, 2023
zachschillaci27 pushed a commit to zachschillaci27/langchain that referenced this pull request Mar 8, 2023
…w many chunks of context will be retrieved (langchain-ai#1155)

given that we allow user define chunk size, think it would be useful for
user to define how many chunks of context will be retrieved.
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.

None yet

2 participants