ChickenBenny commented on issue #144:
URL: https://github.com/apache/flink-agents/issues/144#issuecomment-6825873215

   Thanks @wenjin272! Yeah, a retrieval tool makes more sense to me too. I'd 
like to work on it.
   
   Here's roughly what I'm thinking:
   
   ```python
   ResourceDescriptor(
       clazz=ResourceName.Tool.VECTOR_STORE_SEARCH,
       vector_store="knowledge_base",
       max_results=3,
       name="search_flink_docs",
       description="Search the Flink documentation.",
   )
   ```
   
   - The LLM only passes `query`. `max_results` is set in config so the results 
don't get too long.
   - It returns each doc's `content` and `metadata`, so the model can tell 
where the info came from.
   - If nothing is found, it returns something like "No relevant documents 
found." instead of an empty string.
   - If the vector store name is wrong or the query fails, it's reported as a 
tool error.
   - I'd leave filters and scores out for now and add them later if needed.
   - I'll keep the current RAG example and add a new one with `ReActAgent` + 
this tool.
   
   A couple of questions:
   
   1. There's no `ResourceName.Tool` yet. Is it OK to add one (plus the YAML 
alias)?
   2. Some vector stores are Java-only (OpenSearch, Milvus, pgvector, etc.). 
Should I start with Java or Python?
   
   If this sounds good, I'll start with a small PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to