aws-samples / aws-samples/bedrock-chat

[Feature Request / Question] Why using the full input for RAG with cohere instead of making a condensed response

Open
#340 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
1.3k
Forks
535
Avg merge
1d 12h
Merged PRs (30d)
10

Description

## Describe the solution you'd like

When using a custom bot, it implies that the maximum context window is reduced to 2048 because it's fully managed by Cohere.
Why don't use Claude3 to reduce the input question to 2048 token maximum to avoid having errors on client side when the user set a large input. And then send the reduced question to Cohere.

I've already discussed this with an AWS SA in France who agreed with this.

## Why the solution needed

Avoid having errors when using the RAG for users with large context windows

## Additional context

## Implementation feasibility

Are you willing to discuss the solution with us, decide on the approach, and assist with the implementation?

- [ X] Yes
- [ ] No

Contributor guide

Open the contributing guide

Research direction

No implementation files, tests, or entry points are identified. Start by locating the RAG request path and the client-side context-window validation, then determine how a Claude3 reduction step would precede the Cohere request. Done means large inputs no longer fail client-side and the reduced question is sent to Cohere.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
ai, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.