airflow.providers.common.ai.example_dags.example_llamaindex_hook

Example DAGs demonstrating LlamaIndexHook + LlamaIndex operator usage.

Each DAG covers a single pattern. The docs reference these via .. exampleinclude:: so the runnable snippets stay in sync.

Functions

example_llamaindex_embed()

Chunk + embed a directory of documents and persist the index locally.

example_llamaindex_retrieve()

Load a persisted index and run similarity search.

example_llamaindex_cloud_persist()

Persist the index directly to S3 -- no separate upload step.

example_llamaindex_byo_embed_model()

Use a non-OpenAI embedding by instantiating the LlamaIndex class directly.

Module Contents

airflow.providers.common.ai.example_dags.example_llamaindex_hook.example_llamaindex_embed()[source]

Chunk + embed a directory of documents and persist the index locally.

airflow.providers.common.ai.example_dags.example_llamaindex_hook.example_llamaindex_retrieve()[source]

Load a persisted index and run similarity search.

airflow.providers.common.ai.example_dags.example_llamaindex_hook.example_llamaindex_cloud_persist()[source]

Persist the index directly to S3 – no separate upload step.

airflow.providers.common.ai.example_dags.example_llamaindex_hook.example_llamaindex_byo_embed_model()[source]

Use a non-OpenAI embedding by instantiating the LlamaIndex class directly.

LlamaIndex doesn’t ship a universal init helper, so the operator accepts a pre-built BaseEmbedding instance and bypasses the hook entirely. Install the matching extra: pip install llama-index-embeddings-cohere.

Was this entry helpful?