Documentation Index
Fetch the complete documentation index at: https://docs.contextual.ai/llms.txt
Use this file to discover all available pages before exploring further.
Description
Config overrides allow configuration parameters to be determined dynamically at execution time, rather than being fixed in the YAML. This enables workflows where configuration values depend on runtime inputs or outputs from other nodes.
Syntax
Use config_overrides to source configuration values from graph inputs or node outputs:
search_node:
type: SearchUnstructuredDataStep
config:
filter_retrievals: true
config_overrides:
top_k: __inputs__#top_k
input_mapping:
query: __inputs__#query
Override values can come from graph-level inputs:
inputs:
query: str
top_k: int
nodes:
search:
type: SearchUnstructuredDataStep
config_overrides:
top_k: __inputs__#top_k
input_mapping:
query: __inputs__#query
Sourcing from Node Outputs
Override values can also come from outputs of other nodes:
nodes:
constant_k:
type: ConstantStep
config:
value: 20
search:
type: SearchUnstructuredDataStep
config_overrides:
top_k: constant_k#output
input_mapping:
query: __inputs__#query
Example: Dynamic Temperature
nodes:
# Determine temperature based on query type
temperature_selector:
type: LanguageModelStep
config:
prompt_template: |
Analyze this query and return a temperature value between 0 and 1.
For factual queries, use 0.1. For creative queries, use 0.8.
Query: {query}
Return only the number.
model_id: "vertex_ai/gemini-2.0-flash"
input_mapping:
query: __inputs__#query
generate:
type: GenerationStep
config_overrides:
temperature: temperature_selector#response
input_mapping:
message_history: create_message_history#message_history
Combining Config and Config Overrides
Static and dynamic configuration can be combined on the same node:
search:
type: SearchUnstructuredDataStep
config:
# Static configuration
lexical_alpha: 0.1
semantic_alpha: 0.9
reranker: "ctxl-rerank-v2-instruct-multilingual-FP8"
config_overrides:
# Dynamic configuration
top_k: dynamic_k#output
rerank_top_k: dynamic_rerank_k#output
input_mapping:
query: __inputs__#query