|
| 1 | +--- |
| 2 | +#https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4 |
| 3 | +title: PGVector Vector Store |
| 4 | +description: Documentation for the PGVector node in n8n, a workflow automation platform. Includes details of operations and configuration, and links to examples and credentials information. |
| 5 | +priority: medium |
| 6 | +--- |
| 7 | + |
| 8 | +# PGVector Vector Store |
| 9 | + |
| 10 | +PGVector is an extension of Postgresql. Use this node to interact with the PGVector tables in your Postgresql database. You can insert documents into a vector table, get documents from a vector table, and retrieve documents to provide them to a retriever connected to a chain. |
| 11 | + |
| 12 | +On this page, you'll find the node parameters for the PGVector node, and links to more resources. |
| 13 | + |
| 14 | +/// note | Credentials |
| 15 | +You can find authentication information for this node [here](/integrations/builtin/credentials/postgres/). |
| 16 | +/// |
| 17 | + |
| 18 | +--8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md" |
| 19 | + |
| 20 | +## Node parameters |
| 21 | + |
| 22 | +--8<-- "_snippets/integrations/builtin/cluster-nodes/vector-store-mode.md" |
| 23 | + |
| 24 | +<!-- vale off --> |
| 25 | +### Get Many parameters |
| 26 | +<!-- vale on --> |
| 27 | + |
| 28 | +* **Table name**: Enter the name of the table you want to query. |
| 29 | +* **Prompt**: Enter your search query. |
| 30 | +* **Limit**: Enter a number to set how many results to retrieve from the vector store. For example, set this to `10` to get the ten best results. |
| 31 | + |
| 32 | +### Insert Documents parameters |
| 33 | + |
| 34 | +* **Table name**: Enter the name of the table you want to query. |
| 35 | + |
| 36 | +### Retrieve Documents parameters (for Agent/Chain) |
| 37 | + |
| 38 | +* **Table name**: Enter the name of the table you want to query. |
| 39 | + |
| 40 | +## Node options |
| 41 | + |
| 42 | +### Collection |
| 43 | + |
| 44 | +A way to separate datasets in PGVector. This creates a separate table and column to keep track of which collection a vector belongs to. |
| 45 | + |
| 46 | +* **Use Collection**: Select whether to use a collection (turned on) or not (turned off). |
| 47 | +* **Collection Name**: Enter the name of the collection you want to use. |
| 48 | +* **Collection Table Name**: Enter the name of the table to store collection information in. |
| 49 | + |
| 50 | +### Column Names |
| 51 | + |
| 52 | +The following options specify the names of the columns to store the vectors and corresponding information in: |
| 53 | + |
| 54 | +* **ID Column Name** |
| 55 | +* **Vector Column Name** |
| 56 | +* **Content Column Name** |
| 57 | +* **Metadata Column Name** |
| 58 | + |
| 59 | +### Metadata Filter |
| 60 | + |
| 61 | +--8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-root-nodes/vector-store-metadata-filter.md" |
| 62 | + |
| 63 | +## Templates and examples |
| 64 | + |
| 65 | +<!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 --> |
| 66 | +[[ templatesWidget(title, 'pgvector-vector-store') ]] |
| 67 | + |
| 68 | +## Related resources |
| 69 | + |
| 70 | +Refer to [LangChain's PGVector documentation](https://js.langchain.com/docs/integrations/vectorstores/pgvector){:target=_blank .external-link} for more information about the service. |
| 71 | + |
| 72 | +--8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md" |
| 73 | + |
| 74 | +--8<-- "_snippets/self-hosting/starter-kits/self-hosted-ai-starter-kit.md" |
0 commit comments