Add Memory Store conceptual doc section (#2624)

On semantic search
This commit is contained in:
William FH
2024-12-04 15:19:49 +00:00
committed by GitHub
parent e6c83abecd
commit c322f7ffa6
5 changed files with 87 additions and 22 deletions
@@ -59,7 +59,7 @@ def search_memory(state: State, *, store: BaseStore):
results = store.search(
namespace=("memory", "facts"), # Organize memories by type
query="your search query",
k=3 # number of results to return
limit=3 # number of results to return
)
return results
```
+9
View File
@@ -81,6 +81,15 @@ The `fields` configuration determines which parts of your documents to embed:
}
```
!!! note "Common model dimensions"
- openai:text-embedding-3-large: 3072
- openai:text-embedding-3-small: 1536
- openai:text-embedding-ada-002: 1536
- cohere:embed-english-v3.0: 1024
- cohere:embed-english-light-v3.0: 384
- cohere:embed-multilingual-v3.0: 1024
- cohere:embed-multilingual-light-v3.0: 384
#### Semantic search with a custom embedding function
If you want to use semantic search with a custom embedding function, you can pass a path to a custom embedding function: