Comments (2)
Reiterating the problem
The construct currently employs a long context window approach for document processing when a document name is specified. This means it likely uses the entirety of the document's content or a significant part of it as context for generating responses.
Potential Solution
A potential solution involves adding a new parameter to the GraphQL schema that allows users to select the method (long context window or RAG). This parameter could be something like responseGenerationMethod with possible values longContext and RAG.
Plan
- Schema Update:
a. Modify the GraphQL schema to include the new parameter. - Handling the Parameter in Lambda Functions:
a. Update the AWS Lambda function logic to handle this new parameter. This will involve:
- Implementing a conditional logic to choose between the long context window approach and the RAG approach based on the parameter's value.
- For the RAG approach, you might need to implement or integrate a mechanism to fetch relevant document snippets based on the query, which are then used as context for the response generation.
- Testing:
a. Ensure thorough testing for both paths (long context and RAG) to confirm that the system behaves as expected in each case. - Update the documentation
a. to include information about the new parameter, and provide examples of how to use it.
from generative-ai-cdk-constructs.
Perfect, thanks @MichaelWalker-git ! Just one comment: "For the RAG approach, you might need to implement or integrate a mechanism to fetch relevant document snippets based on the query, which are then used as context for the response generation." -> this is already there, need only the conditional logic :)
from generative-ai-cdk-constructs.
Related Issues (20)
- Search construct HOT 1
- L3 Constructs: Support Amazon Aurora with PGVector
- SageMaker instance start/stop
- (Opensearch): AuthorizationException thrown in opensearch_index.py when first deploy HOT 2
- (multiple constructs): cannot access public ecr repo HOT 1
- (github): automate the approval of auto generated PRs
- Monthly issue metrics report HOT 1
- Monthly issue metrics report HOT 1
- (generative-ai-cdk-constructs): KnowledgeBase construct cannot create vector store
- (bedrock): adopt official cloudformation resources HOT 2
- amazonaurora: ImportError: cannot import name 'AmazonAuroraDefaultVectorStore' HOT 2
- (cdk-lib): add python code snippets
- (amazonaurora): merge amazon aurora vector stores HOT 1
- Foundation Models are erring with Knowledge Base HOT 2
- pydpdf2 : update dep to pypdf
- bedrock: Agent CR Lambda provider errors not surfaced HOT 3
- (bedrock): add support for Claude 3 models
- bedrock: initial sync for S3DataSource attached to KnowledgeBase
- Monthly issue metrics report
- Monthly issue metrics report
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generative-ai-cdk-constructs.