Skip to content

Commit

Permalink
ƒeat(agents-api): Allow confidence control for embeddings search in s…
Browse files Browse the repository at this point in the history
…ystem-type tools (#673)

<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Adds confidence control to document search in `execute_system()` and
updates `README.md` with Julep vs. LangChain comparison.
> 
>   - **Behavior**:
> - Adds `confidence` parameter to `HybridDocSearchRequest` and
`VectorDocSearchRequest` in `execute_system()` for agent and user
document searches, defaulting to 0.7.
>   - **Documentation**:
> - Adds "Why Julep vs. LangChain?" section in `README.md` with
sub-sections on use cases, form factor, and summary.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 56a9559. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: HamadaSalhab <[email protected]>
  • Loading branch information
HamadaSalhab and HamadaSalhab authored Oct 16, 2024
1 parent 8390c60 commit 24f0c23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ Exciting news! We're participating in DevFest.AI throughout October 2024! 🗓
- [Local Quickstart](#local-quickstart)
- [SDK Reference](#sdk-reference)
- [API Reference](#api-reference)
- [Why Julep vs. LangChain?](#why-julep-vs-langchain)
- [Different Use Cases](#different-use-cases)
- [Different Form Factor](#different-form-factor)
- [In Summary](#in-summary)

</details>
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
Expand Down
2 changes: 2 additions & 0 deletions agents-api/agents_api/activities/execute_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ async def execute_system(
search_params = HybridDocSearchRequest(
text=arguments.pop("text"),
vector=arguments.pop("vector"),
confidence=arguments.pop("confidence", 0.7),
limit=arguments.get("limit", 10),
)

Expand All @@ -118,6 +119,7 @@ async def execute_system(
elif "vector" in arguments:
search_params = VectorDocSearchRequest(
vector=arguments.pop("vector"),
confidence=arguments.pop("confidence", 0.7),
limit=arguments.get("limit", 10),
)

Expand Down

0 comments on commit 24f0c23

Please sign in to comment.