aws-samples / amazon-kendra-langchain-extensions

Samples to build Generative AI applications with LangChain and Amazon Kendra
https://aws.amazon.com/blogs/machine-learning/quickly-build-high-accuracy-generative-ai-applications-on-enterprise-data-using-amazon-kendra-langchain-and-large-language-models/
MIT No Attribution
158 stars 104 forks source link

Querry through specific data source #65

Closed ghost closed 7 months ago

ghost commented 7 months ago

i have added 3 to 4 s3 buckets as data sources in one kendra index, but while retriving the data from AmazonKendraRetriever(indexId,region) it checks all the datasources and give the results but i want to check only specific s3 data sources. How to configure these in code .

MithilShah commented 7 months ago

You can make the data source id Facetable in Kendra, and then use a filter while issuing the query using the data sources from which you would like to get the response.

ghost commented 7 months ago

okay great ,in enterprise edition AWS provides 50 data sources to add into one kendra index . But if the the data is very huge and we connect one data source with one s3 bucket and inside this different folder structures are available for storing the large amount of files. In this case how to search specific s3 folder structure files by using AmazonKendraRetriever(indexId,region,credentials) through code .

MithilShah commented 7 months ago

I think its best to reach out to AWS support for this or try out https://repost.aws/