From EmbeddingModelSettings.schema.yaml (jarvisv2/EmbeddingModelSettings.schema
)
---
$id: https://skeleton.botmd.io/cleo/EmbeddingModelSettings.schema
$schema: http://json-schema.org/draft-07/schema#
title: Embedding Model Settings
type: object
description: Defines settings for the embedding model during data and query flow.
properties:
default_prompt_name:
default: query
description: Prompt for the embedding.
enum: [query, text]
title: Prompt Name
type: string
dimension:
default: -1
description: Dimension of the embedding
title: Dimension
type: integer
emb_model_source:
default: huggingface
description: Where is the model from?
enum: [huggingface, bedrock]
title: Model Source
type: string
hnsw_kwargs:
anyOf:
- $ref: '#/$defs/HNSWSettings'
- type: 'null'
default: null
description: HNSW settings
title: HNSW settings
model:
description: Name of embedding model to use.
minLength: 1
title: Model
type: string
query_instruction:
default: 'Represent this sentence for searching relevant passages:'
description: Instruction for the query.
title: Query Instruction
type: string
context_size:
default: 512
description: Context size of the embedding model
title: Context Size
type: integer
required: [model]
$defs:
HNSWSettings:
description: |-
Defines settings for HNSW graph. See
https://github.com/run-llama/llama_index/blob/977d60a058c691957dae3eb3c66c1894faea24ac/llama-index-integrations/vector_stores/llama-index-vector-stores-postgres/llama_index/vector_stores/postgres/base.py#L570
properties:
hnsw_dist_method:
default: vector_cosine_ops
description: Distance metric to use. Note that by default PGVectorStore._build_query
calls cosine_distance
enum: [vector_l2_ops, vector_ip_ops, vector_cosine_ops, vector_l1_ops, bit_hamming_ops,
bit_jaccard_ops]
title: dist_method
type: string
hnsw_ef_construction:
default: 64
description: Size of the dynamic candidate list for constructing the graph.
Higher value provides better recall at the cost of speed
title: ef_construction
type: integer
hnsw_ef_search:
default: 40
description: Size of the dynamic candidate list for search. Higher value provides
better recall at the cost of speed.
title: ef_search
type: integer
hnsw_m:
default: 16
description: Max number of connections per layer.
title: m
type: integer
title: HNSW Graph Settings
type: object