Skip to content
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

update docs for store, index and filter #382

Merged
merged 12 commits into from
Dec 18, 2024
Prev Previous commit
Next Next commit
rename __embed__key__ => embed_key
ouonline committed Dec 16, 2024
commit c6112ff7b6b3fbf7c443dea6ec44928d4d131bcc
8 changes: 4 additions & 4 deletions docs/en/Best Practice/rag.md
Original file line number Diff line number Diff line change
@@ -107,7 +107,7 @@ The configuration parameter `store_conf` is a `dict` type that includes the foll
- `dir`(required): Directory where data is stored.
- `milvus`: Uses Milvus for data storage.
- `uri`: The Milvus storage address, which can be a file path or a URL in the format of `ip:port`.
- `index_kwargs` (optional): Milvus index configuration, which can be a dictionary or a list. If it is a dictionary, it means that all embedding indexes use the same configuration; if it is a list, the elements in the list are dictionaries, representing the configuration used by the embeddings specified by `__embed_key__`. Currently, only `floating point embedding` and `sparse embedding` are supported for the two types of embeddings, with the following supported parameters respectively:
- `index_kwargs` (optional): Milvus index configuration, which can be a dictionary or a list. If it is a dictionary, it means that all embedding indexes use the same configuration; if it is a list, the elements in the list are dictionaries, representing the configuration used by the embeddings specified by `embed_key`. Currently, only `floating point embedding` and `sparse embedding` are supported for the two types of embeddings, with the following supported parameters respectively:
- `floating point embedding`: [https://milvus.io/docs/index-vector-fields.md?tab=floating](https://milvus.io/docs/index-vector-fields.md?tab=floating)
- `sparse embedding`: [https://milvus.io/docs/index-vector-fields.md?tab=sparse](https://milvus.io/docs/index-vector-fields.md?tab=sparse)
* `indices`: This is a dictionary where the key is the name of the index type, and the value is the parameters required for that index type. The currently supported index types are:
@@ -133,18 +133,18 @@ store_conf = {
},
}
```
Also you can configure multi index type for Milvus backend as follow, where the `__embed_key__` should match the key of multi embeddings passed to Document:
Also you can configure multi index type for Milvus backend as follow, where the `embed_key` should match the key of multi embeddings passed to Document:

```python
{
...
'index_kwargs' = [
{
'__embed_key__': 'vec1',
'embed_key': 'vec1',
'index_type': 'HNSW',
'metric_type': 'COSINE',
},{
'__embed_key__': 'vec2',
'embed_key': 'vec2',
'index_type': 'SPARSE_INVERTED_INDEX',
'metric_type': 'IP',
}
6 changes: 3 additions & 3 deletions docs/zh/Best Practice/rag.md
Original file line number Diff line number Diff line change
@@ -107,7 +107,7 @@ docs.create_node_group(name='sentence-len',
- `dir`(必填):存储数据的目录。
- `milvus`:使用 Milvus 存储数据。
- `uri`(必填):Milvus 存储地址,可以是一个文件路径或者如 `ip:port` 格式的 url;
- `index_kwargs`(可选):Milvus 索引配置,可以是一个 dict 或者 list。如果是一个 dict 表示所有的 embedding index 使用同样的配置;如果是一个 list,list 中的元素是 dict,表示由 `__embed_key__` 所指定的 embedding 所使用的配置。当前只支持 floaing point embedding 和 sparse embedding 两种 embedding 类型,分别支持的参数如下:
- `index_kwargs`(可选):Milvus 索引配置,可以是一个 dict 或者 list。如果是一个 dict 表示所有的 embedding index 使用同样的配置;如果是一个 list,list 中的元素是 dict,表示由 `embed_key` 所指定的 embedding 所使用的配置。当前只支持 floaing point embedding 和 sparse embedding 两种 embedding 类型,分别支持的参数如下:
- `floating point embedding`:[https://milvus.io/docs/index-vector-fields.md?tab=floating](https://milvus.io/docs/index-vector-fields.md?tab=floating)
- `sparse embedding`:[https://milvus.io/docs/index-vector-fields.md?tab=sparse](https://milvus.io/docs/index-vector-fields.md?tab=sparse)
* `indices`:是一个 dict,key 是索引类型名称,value 是该索引类型所需要的参数。索引类型目前支持:
@@ -139,11 +139,11 @@ store_conf = {
...
'index_kwargs' = [
{
'__embed_key__': 'vec1',
'embed_key': 'vec1',
'index_type': 'HNSW',
'metric_type': 'COSINE',
},{
'__embed_key__': 'vec2',
'embed_key': 'vec2',
'index_type': 'SPARSE_INVERTED_INDEX',
'metric_type': 'IP',
}