New to Kestra?
Use blueprints to kickstart your first workflows.
Schedule a nightly RAG ingestion pipeline with Kestra and Gemini. Fetch URLs, chunk content, and index embeddings into a vector store via daily cron.
Keep a Retrieval-Augmented Generation (RAG) knowledge base fresh automatically. This blueprint runs a scheduled nightly ingestion pipeline that fetches documents from external URLs, splits them into overlapping chunks, generates Google Gemini embeddings, and stores them in a vector store so a downstream chat or Q&A agent always retrieves current context. It solves the stale-index problem: when your source docs (release notes, changelogs, knowledge base articles) change, your RAG answers should change too, without anyone running an ingestion job by hand.
reindex_daily trigger (io.kestra.plugin.core.trigger.Schedule) fires every night at 03:00 via the cron 0 3 * * *, before the workday starts.ingest task (io.kestra.plugin.ai.rag.IngestDocument) reads source content listed under fromExternalURLs (here, a Kestra release blog Markdown file) directly, with no intermediate file storage.documentSplitter chunks each document with the PARAGRAPH splitter, a maxSegmentSizeInChars of 4096, and a maxOverlapSizeInChars of 200 so context is preserved across chunk boundaries while staying within embedding limits.provider block (io.kestra.plugin.ai.provider.GoogleGemini, model gemini-embedding-001) generates embeddings, authenticating with the GEMINI_API_KEY secret.io.kestra.plugin.ai.embeddings.KestraKVStore, a zero-infrastructure vector store built into Kestra.drop: true rebuilds the index from scratch on every run so removed or edited content never lingers as stale chunks.retry policy (3 attempts, 1-minute interval) plus a PT10M timeout absorb transient network or API failures without runaway executions.Embedding APIs and vector stores have no native scheduler, retry logic, or run history of their own. Kestra wraps the ingestion in a declarative YAML flow with an event-driven Schedule trigger, automatic retries on transient failures, full execution lineage, and observable run logs. You get reproducible, auditable refreshes and an easy path to chain ingestion with downstream querying, alerting, or approval steps, which a standalone embedding script cannot provide.
gemini-embedding-001 model.GEMINI_API_KEY: your Google Gemini API key, used to authenticate embedding generation.GEMINI_API_KEY as a secret in your Kestra instance.fromExternalURLs with your own document source.io.kestra.plugin.ai.rag.ChatCompletion task at the same KestraKVStore embeddings to query the indexed content.KestraKVStore for Qdrant or PGVector as your corpus grows; the rest of the flow stays the same.maxSegmentSizeInChars and maxOverlapSizeInChars to balance retrieval precision against cost.ChatCompletion task or a notification step that runs after ingestion completes.