Commit ab8d2fe
authored
feat: implementation of semanticly retrieved dynamic toolsets (#818)
- Implements experimental dynamic tool selection through `Gram-Mode`
header `semantic_search` | `progressive_search`
- question should we call this mode `semantic` instead?
- Vector storage and semantic search of toolsets is done via pgvector,
all encapsulated into the `rag/search_tools.go` client.
- For embedding this will be done through openrouter base client right
now using the `text-embedding-3-small`
- Given this is experimental and a toolset cannot be marked as dynamic.
Indexing is done on demand as necessary in find_tools. We do not need to
reindex if we recognize there has been no change to the toolset version
or tools. Even in cases where toolset indexing is necessary it is still
quite fast, easily under a second (spans tracking)
- Right now we just hard delete old embeddings. There is no immediate
reason to keep them around so it preserves space. The data model is
setup for soft deletions
Following this we'll complete a documentation page on these experimental
modes and start our own testing across large toolsets between different
modes.1 parent 2f6f870 commit ab8d2fe
File tree
30 files changed
+2780
-2169
lines changed- .changeset
- server
- cmd/gram
- database
- gen
- http
- cli/gram
- toolsets
- client
- server
- variations/client
- types
- internal
- conv
- database
- mcp
- mv
- rag
- repo
- thirdparty/openrouter
30 files changed
+2780
-2169
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
516 | 517 | | |
517 | 518 | | |
518 | 519 | | |
| 520 | + | |
519 | 521 | | |
520 | 522 | | |
521 | 523 | | |
| |||
550 | 552 | | |
551 | 553 | | |
552 | 554 | | |
553 | | - | |
| 555 | + | |
554 | 556 | | |
555 | 557 | | |
556 | 558 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| |||
341 | 345 | | |
342 | 346 | | |
343 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Large diffs are not rendered by default.
0 commit comments