-
Notifications
You must be signed in to change notification settings - Fork 2
Add wrapper tool for FactReasoner #79
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
base: develop
Are you sure you want to change the base?
Conversation
|
@jbrry Could you please add Some sample PRs:
etc |
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.
[Initial superficial ocmments]
…vector_database_tool
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.
Thanks for the PR! I think the text splitter tool is not needed - we can just use the langchain implementation/or any existing implementation and pass the documents to the vector db to be indexed. Please see comments.
|
@jbrry There's merge conflict with develop. Could you pull in develop latest changes and resolve? |
|
❌ Tests failed (exit code: ) 📊 Test Results
Branch: 📋 Full coverage report and logs are available in the workflow run. |
|
❌ Tests failed (exit code: 1) 📊 Test Results
Branch: 📋 Full coverage report and logs are available in the workflow run. |
|
❌ Tests failed (exit code: ) 📊 Test Results
Branch: 📋 Full coverage report and logs are available in the workflow run. |
de16045 to
e7ef733
Compare
|
❌ Tests failed (exit code: 1) 📊 Test Results
Branch: 📋 Full coverage report and logs are available in the workflow run. |
|
❌ Tests failed (exit code: 1) 📊 Test Results
Branch: 📋 Full coverage report and logs are available in the workflow run. |
|
❌ Tests failed (exit code: 1) 📊 Test Results
Branch: 📋 Full coverage report and logs are available in the workflow run. |
akd/tools/vector_db_tool.py
Outdated
| description="Path to the persistent ChromaDB directory.", | ||
| ) | ||
| collection_name: str = Field( | ||
| default="litagent_demo", |
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.
Can we rename the default name to something else? like akd_vdb or something?
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.
Nitpick
|
❌ Tests failed (exit code: 1) 📊 Test Results
Branch: 📋 Full coverage report and logs are available in the workflow run. |
|
❌ Tests failed (exit code: 1) 📊 Test Results
Branch: 📋 Full coverage report and logs are available in the workflow run. |
Summary 📝
This PR adds
FactCheckToolwhich is a wrapper to call the hosted FactReasoner service.It also adds some helper tools which enable further downstream analysis: a
VectorDBToolwhich is based on a Chroma vector database is added so that search artefacts can be stored for downstream analysis or so that FactReasoner can use it for context retrieval.Details
VectorDBTool:akd/tools/vector_db_tool.pyused for interacting with a vector database. It uses ChromaDB for persistent storage and sentence-transformers for creating embeddings. The.index()method is used for adding documents, and_arunruns the retrieval based on a query.DeepLitSearchAgentIntegration: The new functionality has been added as part of a DeepLitSearchAgent run. This shows how we can use the new tools to work along with theDeepLitSearchAgent.Usage
Documentation for the backend deployment is available here.
Standalone example:
It returns the factuality score based on the question and response pair:
I am also listing the test files for each of these tools, which cover initialization and running of the tools and can serve as documentation:
VectorDBTool: test script exampleFactCheckTool: test script example.