-
Notifications
You must be signed in to change notification settings - Fork 29
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
Index routing tool #110
base: main
Are you sure you want to change the base?
Index routing tool #110
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #110 +/- ##
=============================================
- Coverage 81.70% 50.58% -31.13%
- Complexity 190 197 +7
=============================================
Files 13 22 +9
Lines 962 1627 +665
Branches 130 189 +59
=============================================
+ Hits 786 823 +37
- Misses 126 752 +626
- Partials 50 52 +2 ☔ View full report in Codecov by Sentry. |
c85db26
to
7edd549
Compare
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
7edd549
to
f3c5ee0
Compare
|
||
// call LLM, MLModelTool | ||
String question = parameters.get(INPUT_FIELD); | ||
String prompt = buildPrompt(summaryStr, question); |
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.
We might want to guard the number of tokens in the summaryStr
, when it is too long, the performance of Claude-instant drops significantly and it is expensive. (I have some idea/implementation in Python, we can discuss how to best proceed there.)
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.
right, that's in todo list. let's have a discuss about how to implement it.
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
public static String INDEX_SUMMARY = "summary"; | ||
public static String INDEX_EMBEDDING = "embedding"; | ||
public static String SENTENCE_EMBEDDING = "sentence_embedding"; | ||
public static int DEFAULT_TIMEOUT_SECOND = 30; |
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.
Just FYI, when I tested it locally on my mac, with 60-70 indexes, 30 seconds seems not enough.
Signed-off-by: Hailong Cui <ihailong@amazon.com>
@@ -0,0 +1,19 @@ | |||
{ |
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.
What's this new index for?
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.
this index served as vector store for index summary embeddings.
import lombok.extern.log4j.Log4j2; | ||
|
||
/** | ||
* monitor agent change and trigger index summary embedding job for new agent |
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.
Why need to add this job?
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.
IndexSummaryEmbedding
job run with less frequency like daily, and AgentMonitorJob
rum more frequently to run for newly created agent which has IndexRoutingTool
configured.
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Description
use this tool to select appropriate index for PPL query
Issues Resolved
[List any issues this PR will resolve]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.