Files
langflow/docs/docs/_partial-vector-rag-flow.mdx
Mendon Kissling a7825e14c9 docs: 1.6 feature branch (#9521)
* docs: update file size limit to 1024 mb (#9397)

* update-file-size-limit-to-1024-mb

* docs: clarify available API endpoints and their use cases (#9382)

* available-endpoints

* asterisk

* structure-into-tabs-and-confirm-login-endpoint

* reorg and clarify some usage

---------

Co-authored-by: April M <april.murphy@datastax.com>

---------

Co-authored-by: April M <april.murphy@datastax.com>

* add-lfx-kb-agent-struct-out

* update-release-notes

* docs: docling integration into file component (#9481)

* init

* ui-package-manager

* more-content

* components-page

* dependency-included-for-1.6

* remove-package-management-feature

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* clarify-file-extension-behavior

* config-dir-not-in-1.6

* clarify-outputs

* add-links-andupdate-parameters

* more-params

* clarify-supported-filetypes

* installation-in-bundle

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* Apply suggestions from code review

---------

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* docs: Traceloop SDK integration documentation (#9514)

* Added documentation file for langflow-traceloop-instana integration

* updated sidebar.js

* Updated documentation with metrics integration instructions

* Update docs/docs/Integrations/integrations-instana-traceloop.mdx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update docs/docs/Integrations/integrations-instana-traceloop.mdx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* update doc

* Format correction

* Formatting correction

* Updated Slug title

* style-edit

* Split configure environment variables into steps

* Formatted as per Google developer style guide

* Update docs/docs/Integrations/integrations-instana-traceloop.mdx

Co-authored-by: Edwin Jose <edwinjose900@gmail.com>

* More context added on OTLP security

* Added screenshots of Instana dashboards

* Updated as per the review comments

* Update docs/docs/Integrations/integrations-instana-traceloop.mdx

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>

* Update docs/docs/Integrations/integrations-instana-traceloop.mdx

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>

* Update docs/docs/Integrations/integrations-instana-traceloop.mdx

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>

* Update docs/docs/Integrations/integrations-instana-traceloop.mdx

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>

* updated refer documentation links

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwinjose900@gmail.com>

* docling-and-traceloop-links-for-release-notes-remove-duplicates

* traceloop-touchup

* add-component-release-notes

* docs: 1.6 knowledge base feature (#9381)

* sidebars-and-content

* add-kb-components

* completed-basic-outline

* updates-and-new-names

* kb-tutorial-content

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* move-component-docs-to-main-page

* code-review

* reorganize-content

* add-link-to-agents

* fix links, create components-kb

* move and revise kb content

* missing import

---------

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: April M <april.murphy@datastax.com>

* docs: Component documentation updates for 1.6.0 (#9627)

* bundles icon

* component menu and bundle icons

* mcp icon extension

* more bundle icon

* workspace gestures and locking

* mcp server stuff

* fix typo and move serper component

* g-assist edit

* simplify hidden param text and update cohere

* amazon components

* nvidia system assist

* use partial for hidden param text

* fix import, add partial for agent summary

* style changes to prep for separating vector page

* rework llm and embedding model pages

* handle legacy components

* remove memories page

* tools page

* applied partials to vector stores before moving

* move redis and ds, fix links

* astra db component updates

* c vector stores

* traceloop copyedits

* advanced parsing

* elastic page and ocr engine edit

* q-w vector stores

* rest of vector stores

* fix build errors

* Revert "mcp icon extension"

This reverts commit 4d1582793a.

* unused imports and build errors

* build errors

* better icon reference

* tip edits

* fixing after preview

* more touchup

* small style edits for ts client page

* replicate pr 9676

* fix style

* KB comments

* Update docs/docs/Components/bundles-mongodb.mdx

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>

---------

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>

* add deprecated component to release notes

* knowledge and message history

* wording

* legacy components

* capitalization

* docs: OpenAI responses endpoint (#9539)

* init

* more-content-and-examples

* cleanup

* add-response-tabs-and-streaming-example

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* requires-agent-component-to-emit-message

* [autofix.ci] apply automated fixes

* test-and-explain-more

* global-var-and-fallback

* bash-not-curl-codeblock

* tighten-up-intro-para

* add-entry-to-concepts-publish-page

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* fix-merge-mistake

* flow-id-or-endpoint-name

* reformat

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* standardize-table-codefont

---------

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix build

* code rabbit comments

* docs: remove knowledge base content from 1.6 (#9784)

* remove-kb-content

* broken links

* random change to restart build

---------

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: April M <april.murphy@datastax.com>

* docs: update composio bundle page (#9442)

* update-composio-integrations

* update-doc-to-be-general

* trailing-space

* add-tool-script

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* global-variable

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* reorder-steps-and-move-script

* clarify-connection

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes (attempt 3/3)

* tools slug/name

* test composio steps

* remove unnecessary import

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

---------

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: April M <april.murphy@datastax.com>

* chore: small misses and sync with 9-Sep-25 release build (#9792)

* io page

* fix slug

* custom models and canvas controls

* message history

* composio slack

* move a flow

* vlm option for docling

* docs: add oauth for mcp (#9626)

* oauth-and-none-options

* mcp-composer-for-server

* updates-from-testing

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* clarify-client-update

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* code-review

* clarify-oauth-values

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* code-review

* double-words

---------

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* docs: include guidance for openai client dummy key (#9871)

* test-client-calls

* less-prose

* clearer-intro

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* remove-indentation-and-correct-example-key-value

* comment-syntax

---------

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* docs: mcp tools troubleshooting (#9866)

* move-mcp-troubleshooting-from-server-page-and-add-issue

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>

---------

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>

* docs: auth changes (#9731)

* initial-content

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* code-review

* Apply suggestions from code review

---------

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* docs: CORS configuration (#9773)

* initial-content

* title

* clarify-default

* cleanup

* cors-defaults-with-warning-for-1.7

* docs-and-code-review

* clarify-cors-in-future-release

* code-review

* developer mode for docling

* auto login

* cors

* auth variables

* environment variables pt 1

* env var pt 2

* env var pt 3

* env var pt 5

* align CLI page with env var

* autologin

* docs: clarify log format behavior (#9945)

clarify-log-format-behavior

* docling dependency exceptions

---------

Co-authored-by: April M <april.murphy@datastax.com>
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: Sandesh R <115570766+2getsandesh@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwinjose900@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
2025-09-26 14:05:06 +00:00

75 lines
5.9 KiB
Plaintext

import Icon from "@site/src/components/icon";
:::tip
For a tutorial that uses vector data in a flow, see [Create a vector RAG chatbot](/chat-with-rag).
:::
The following example demonstrates how to use vector store components in flows alongside related components like embedding model and language model components.
These steps walk through important configuration details, functionality, and best practices for using these components effectively.
This is only one example; it isn't a prescriptive guide to all possible use cases or configurations.
1. Create a flow with the **Vector Store RAG** template.
This template has two subflows.
The **Load Data** subflow loads embeddings and content into a vector database, and the **Retriever** subflow runs a vector search to retrieve relevant context based on a user's query.
2. Configure the database connection for both [**Astra DB** components](/bundles-datastax#astra-db), or replace them with another pair of vector store components of your choice.
Make sure the components connect to the same vector store, and that the component in the **Retriever** subflow is able to run a similarity search.
The parameters you set in each vector store component depend on the component's role in your flow.
In this example, the **Load Data** subflow _writes_ to the vector store, whereas the **Retriever** subflow _reads_ from the vector store.
Therefore, search-related parameters are only relevant to the **Vector Search** component in the **Retriever** subflow.
For information about specific parameters, see the documentation for your chosen vector store component.
3. To configure the embedding model, do one of the following:
* **Use an OpenAI model**: In both **OpenAI Embeddings** components, enter your OpenAI API key.
You can use the default model or select a different OpenAI embedding model.
* **Use another provider**: Replace the **OpenAI Embeddings** components with another pair of [embedding model components](/components-embedding-models) of your choice, and then configure the parameters and credentials accordingly.
* **Use Astra DB vectorize**: If you are using an Astra DB vector store that has a vectorize integration, you can remove both **OpenAI Embeddings** components.
If you do this, the vectorize integration automatically generates embeddings from the **Ingest Data** (in the **Load Data** subflow) and **Search Query** (in the **Retriever** subflow).
:::tip
If your vector store already contains embeddings, make sure your embedding model components use the same model as your previous embeddings.
Mixing embedding models in the same vector store can produce inaccurate search results.
:::
4. Recommended: In the [**Split Text** component](/components-processing#split-text), optimize the chunking settings for your embedding model.
For example, if your embedding model has a token limit of 512, then the **Chunk Size** parameter must not exceed that limit.
Additionally, because the **Retriever** subflow passes the chat input directly to the vector store component for vector search, make sure that your chat input string doesn't exceed your embedding model's limits.
For this example, you can enter a query that is within the limits; however, in a production environment, you might need to implement additional checks or preprocessing steps to ensure compliance.
For example, use additional components to prepare the chat input before running the vector search, or enforce chat input limits in your application code.
5. In the **Language Model** component, enter your OpenAI API key, or select a different provider and model to use for the chat portion of the flow.
6. Run the **Load Data** subflow to populate your vector store.
In the **File** component, select one or more files, and then click <Icon name="Play" aria-hidden="true" /> **Run component** on the vector store component in the **Load Data** subflow.
The **Load Data** subflow loads files from your local machine, chunks them, generates embeddings for the chunks, and then stores the chunks and their embeddings in the vector database.
![Embedding data into a vector store](/img/vector-store-document-ingestion.png)
The **Load Data** subflow is separate from the **Retriever** subflow because you probably won't run it every time you use the chat.
You can run the **Load Data** subflow as needed to preload or update the data in your vector store.
Then, your chat interactions only use the components that are necessary for chat.
If your vector store already contains data that you want to use for vector search, then you don't need to run the **Load Data** subflow.
7. Open the **Playground** and start chatting to run the **Retriever** subflow.
The **Retriever** subflow generates an embedding from chat input, runs a vector search to retrieve similar content from your vector store, parses the search results into supplemental context for the LLM, and then uses the LLM to generate a natural language response to your query.
The LLM uses the vector search results along with its internal training data and tools, such as basic web search and datetime information, to produce the response.
![Retrieval from a vector store](/img/vector-store-retrieval.png)
To avoid passing the entire block of raw search results to the LLM, the **Parser** component extracts `text` strings from the search results `Data` object, and then passes them to the **Prompt Template** component in `Message` format.
From there, the strings and other template content are compiled into natural language instructions for the LLM.
You can use other components for this transformation, such as the **Data Operations** component, depending on how you want to use the search results.
To view the raw search results, click <Icon name="TextSearch" aria-hidden="true" /> **Inspect output** on the vector store component after running the **Retriever** subflow.