Pai Yao Wei
pai4451
AI & ML interests
# NOTE: LangChain has its own rule to create a collection,
# and when your collection schema does not match the requirements, it will raise an error.
# The required fields are 'text', 'pk' and 'vector'
# https://github.com/milvus-io/milvus/issues/24868
# https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/vectorstores/milvus.py#L238
chunk_part_id = FieldSchema(
name="pk", # rename from chunk_part_id
dtype=DataType.VARCHAR,
is_primary=True,
max_length=128,
)
chunk_content = FieldSchema(
name="text", # rename from chunk_content
dtype=DataType.VARCHAR,
max_length=65535,
)
chunk_motime = FieldSchema(
name="motime",
dtype=DataType.VARCHAR,
max_length=27,
)
chunk_filename = FieldSchema(
name="filename",
dtype=DataType.VARCHAR,
max_length=128,
)
# add the `source` field for the chunk
chunk_source = FieldSchema(
name="source",
dtype=DataType.VARCHAR,
max_length=512,
)
# add the `user` field for the chunk
chunk_user = FieldSchema(
name="user",
dtype=DataType.VARCHAR,
max_length=30,
)
# add the `domain` field for the chunk
chunk_domain = FieldSchema(
name="domain",
dtype=DataType.VARCHAR,
max_length=10,
)
# add embedding field
embedded_chunk = FieldSchema(
name="vector", # rename from embedded_chunk
dtype=DataType.FLOAT_VECTOR,
dim=1536
)
# add chunk_doc_id for associating to doc collection
chunk_doc_id = FieldSchema(
name="doc_id",
dtype=DataType.VARCHAR,
max_length=50,
)
rag_chunk_schema = CollectionSchema(
fields=[chunk_part_id, chunk_content, chunk_motime,
chunk_filename, chunk_source, chunk_user, chunk_domain, embedded_chunk, chunk_doc_id,],
description="Rag doc search",
enable_dynamic_field=True
)
{
"user": "mtk71420",
"doc_id": "9acafda1b104521c88d04675497acb764fb0a597",
"doc_dir": "z:/Documents/mtee_r0.mp3/private_r0.mp3/source/trusty-kernel/libvmm/arch/arm",
"doc_name": "traps",
"doc_ext": ".c",
"motime": "2024_01_04_07_31_45_008309"
}
{
"user_id": "mtk24148",
"files": [
{
"user": "mtk24148",
"doc_name": "pv-prod",
"doc_ext": ".yaml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/k8s/files/jaeger",
"motime": "2025_01_10_10_56_27_153846"
},
{
"user": "mtk24148",
"doc_name": "kiali-prod",
"doc_ext": ".yaml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/k8s/files/kiali",
"motime": "2025_01_10_10_56_16_988030"
},
{
"user": "mtk24148",
"doc_name": "jaeger-uat",
"doc_ext": ".yaml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/k8s/files/jaeger",
"motime": "2025_01_10_10_56_27_835066"
},
{
"user": "mtk24148",
"doc_name": "main",
"doc_ext": ".yml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/docker/tasks",
"motime": "2025_01_10_10_55_53_482113"
},
{
"user": "mtk24148",
"doc_name": "load_images",
"doc_ext": ".yml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/docker/tasks",
"motime": "2025_01_10_10_55_57_023722"
},
{
"user": "mtk24148",
"doc_name": "bot",
"doc_ext": ".py",
"doc_dir": "/proj/mtk24148/python-mini-projects-master/projects/chatbot",
"motime": "2024_09_12_16_40_24_425182"
},
{
"user": "mtk24148",
"doc_name": "uat_daemon_set",
"doc_ext": ".yml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/k8s/files/logging/fluent",
"motime": "2025_01_10_10_56_32_140581"
},
{
"user": "mtk24148",
"doc_name": "virtual_service",
"doc_ext": ".yml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/k8s/files/frontend/prod",
"motime": "2025_01_10_10_36_08_548024"
},
{
"user": "mtk24148",
"doc_name": "k8s_join",
"doc_ext": ".yml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/docker/tasks",
"motime": "2025_01_10_10_55_57_711241"
},
{
"user": "mtk24148",
"doc_name": "main",
"doc_ext": ".yml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/docker/defaults",
"motime": "2025_01_10_10_56_04_954301"
},
{
"user": "mtk24148",
"doc_name": "kiali-uat",
"doc_ext": ".yaml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/k8s/files/kiali",
"motime": "2025_01_10_10_56_09_840962"
},
{
"user": "mtk24148",
"doc_name": "virtual_service",
"doc_ext": ".yml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/k8s/files/frontend/dev",
"motime": "2025_01_10_10_39_04_222088"
},
{
"user": "mtk24148",
"doc_name": "update_config",
"doc_ext": ".yml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/docker/tasks",
"motime": "2025_01_10_10_55_56_142897"
},
{
"user": "mtk24148",
"doc_name": "jaeger-prod",
"doc_ext": ".yaml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/k8s/files/jaeger",
"motime": "2025_01_10_10_56_30_667754"
},
{
"user": "mtk24148",
"doc_name": "envoy-ratelimit-gwfilter",
"doc_ext": ".yaml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/k8s/files/backend/prod",
"motime": "2025_01_10_10_37_05_096798"
},
{
"user": "mtk24148",
"doc_name": "install",
"doc_ext": ".yml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/docker/tasks",
"motime": "2025_01_10_10_55_59_947114"
},
{
"user": "mtk24148",
"doc_name": "install-compose",
"doc_ext": ".yml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/docker/tasks",
"motime": "2025_01_10_10_56_01_449143"
},
{
"user": "mtk24148",
"doc_name": "deployment",
"doc_ext": ".yml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/k8s/files/frontend/prod",
"motime": "2024_11_13_09_40_56_041509"
},
{
"user": "mtk24148",
"doc_name": "grafana-prod",
"doc_ext": ".yaml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/k8s/files/grafana",
"motime": "2025_01_10_10_56_05_727481"
},
{
"user": "mtk24148",
"doc_name": "custom",
"doc_ext": ".yaml",
"doc_dir": "c:/Users/mtk24148/Documents/mms-config/roles/k8s/files/istio",
"motime": "2025_01_10_10_56_08_881332"
}
]
}
Organizations