Create a collection that measures alignment and magnitude efficiently.
Dot product measures both alignment and magnitude. For pre-normalized embeddings, it produces the same results as cosine similarity with better computational performance. Check your embedding model’s documentation to confirm whether its output vectors are normalized before choosing this metric.The following example creates a collection named normalized_embeddings configured to use dot product as its distance metric.
from actian_vectorai import VectorAIClient, VectorParams, Distance# Connect to VectorAI DB serverwith VectorAIClient("localhost:6574") as client: # Create collection with dot product client.collections.create( "normalized_embeddings", # Collection name vectors_config=VectorParams(size=128, distance=Distance.Dot) # Dot product metric )
import { VectorAIClient } from '@actian/vectorai-client';async function main() { // Connect to VectorAI DB server const client = new VectorAIClient('localhost:6574'); // Create collection with dot product await client.collections.create('normalized_embeddings', { dimension: 128, distanceMetric: 'DOT' });}main().catch(console.error);
To confirm the collection was created successfully, call client.collections.get_info("normalized_embeddings") and check that the status field returns Ready.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"VectorAI DB","colors":{"primary":"#0066CC","light":"#0073E6","dark":"#0052A3"},"logo":{"light":"https://mintcdn.com/actianvectorai/Ux78X2vdOXohKLon/logo/light.svg?fit=max\u0026auto=format\u0026n=Ux78X2vdOXohKLon\u0026q=85\u0026s=1b88940e85e690e376517438c937e9bd","dark":"https://mintcdn.com/actianvectorai/Ux78X2vdOXohKLon/logo/dark.svg?fit=max\u0026auto=format\u0026n=Ux78X2vdOXohKLon\u0026q=85\u0026s=0b12a311c6ad85c0f00177d6d27d730c","href":"https://www.actian.com"},"favicon":"https://mintcdn.com/actianvectorai/NsZIxn1YYT2snpqj/favicon.svg?fit=max\u0026auto=format\u0026n=NsZIxn1YYT2snpqj\u0026q=85\u0026s=8fa150c5e8a33498c52730a734140029","api":{"openapi":["openapi_prepared/authentication-api.yaml","openapi_prepared/collections-api.yaml","openapi_prepared/filters-api.yaml","openapi_prepared/grouped-search-api.yaml","openapi_prepared/points-api.yaml","openapi_prepared/search-api.yaml"],"playground":{}},"navbar":{"links":[{"href":"https://www.actian.com/support","label":"Support"}],"primary":{"type":"button","label":"Get Started","href":"/home/quickstart/quickstart"}},"footer":{"socials":{"x":"https://x.com/actiancorp","github":"https://github.com/actiancorp","linkedin":"https://linkedin.com/company/actian"}},"integrations":{"ga4":{"measurementId":"G-NHC5CN295F"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"actianvectorai","hasAudioNarration":false,"actualSubdomain":"actianvectorai","customDomains":["docs.vectoraidb.actian.com"],"gitSource":{"type":"github","owner":"actiancorp","repo":"vectorai-db-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aecfd0b83550c071d08b250","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"Fundamentals","count":45},{"language":"default","tag":"API","count":32},{"language":"default","tag":"REST API","count":31},{"language":"default","tag":"Docs","count":26},{"language":"default","tag":"Academy","count":16},{"language":"default","tag":"Collections","count":14},{"language":"default","tag":"Points","count":14},{"language":"default","tag":"Tutorials","count":9},{"language":"default","tag":"Get started","count":9},{"language":"default","tag":"Search","count":8}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"docs/fundamentals/distance-metrics/dot-product-task","slug":"/docs/fundamentals/distance-metrics/dot-product-task","pageMetadata":{"title":"Configure dot product","description":"Create a collection that measures alignment and magnitude efficiently.","icon":"code","href":"/docs/fundamentals/distance-metrics/dot-product-task"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create a collection that measures alignment and magnitude efficiently.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Dot product measures both alignment and magnitude. For pre-normalized embeddings, it produces the same results as cosine similarity with better computational performance. Check your embedding model’s documentation to confirm whether its output vectors are normalized before choosing this metric.`}),`\n`,_jsxs(_components.p,{children:[`The following example creates a collection named `,_jsx(_components.code,{children:`normalized_embeddings`}),` configured to use dot product as its distance metric.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`9`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` actian_vectorai `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` VectorAIClient, VectorParams, Distance`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Connect to VectorAI DB server`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` VectorAIClient(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"localhost:6574\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Create collection with dot product`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.collections.create(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"normalized_embeddings\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Collection name`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` vectors_config`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`VectorParams(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`size`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`128`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`distance`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Distance.Dot) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Dot product metric`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`14`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`VectorAIClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@actian/vectorai-client'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Connect to VectorAI DB server`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` VectorAIClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'localhost:6574'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Create collection with dot product`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`collections`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'normalized_embeddings'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` dimension:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 128`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` distanceMetric:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'DOT'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`To confirm the collection was created successfully, call `,_jsx(_components.code,{children:`client.collections.get_info(\"normalized_embeddings\")`}),` and check that the `,_jsx(_components.code,{children:`status`}),` field returns `,_jsx(_components.code,{children:`Ready`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Configure dot product","description":"Create a collection that measures alignment and magnitude efficiently.","icon":"code","href":"/docs/fundamentals/distance-metrics/dot-product-task"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"subdomain":"actianvectorai","siteName":"VectorAI DB","title":"Configure dot product - VectorAI DB","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-17T09:44:19.405Z","originalFileLocation":"docs/fundamentals/distance-metrics/dot-product-task.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create a collection that measures alignment and magnitude efficiently.\">\u003cmeta data-mint-head name=\"application-name\" content=\"VectorAI DB\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/actianvectorai/HbdFPl4jNN5cTNwv/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/actianvectorai/HbdFPl4jNN5cTNwv/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/actianvectorai/HbdFPl4jNN5cTNwv/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/actianvectorai/HbdFPl4jNN5cTNwv/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/actianvectorai/HbdFPl4jNN5cTNwv/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/actianvectorai/HbdFPl4jNN5cTNwv/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/actianvectorai/HbdFPl4jNN5cTNwv/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/actianvectorai/HbdFPl4jNN5cTNwv/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/actianvectorai/HbdFPl4jNN5cTNwv/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Configure dot product - VectorAI DB\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a collection that measures alignment and magnitude efficiently.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"VectorAI DB\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.vectoraidb.actian.com/docs/fundamentals/distance-metrics/dot-product-task\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://actianvectorai.mintlify.site/_mintlify/api/og/v2?division=Distance+metrics\u0026amp;title=Configure+dot+product\u0026amp;description=Create+a+collection+that+measures+alignment+and+magnitude+efficiently.\u0026amp;theme=fc7aebd6d28e53e0ebe2c563\u0026amp;signature=7f6535f6a36d48ad649158797341160f9e288dc4261f8a2f107afb5a5164f02b\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Configure dot product - VectorAI DB\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a collection that measures alignment and magnitude efficiently.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://actianvectorai.mintlify.site/_mintlify/api/og/v2?division=Distance+metrics\u0026amp;title=Configure+dot+product\u0026amp;description=Create+a+collection+that+measures+alignment+and+magnitude+efficiently.\u0026amp;theme=fc7aebd6d28e53e0ebe2c563\u0026amp;signature=7f6535f6a36d48ad649158797341160f9e288dc4261f8a2f107afb5a5164f02b\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/actianvectorai/HbdFPl4jNN5cTNwv/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"VectorAI DB\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0066CC\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.vectoraidb.actian.com/docs/fundamentals/distance-metrics/dot-product-task\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/fundamentals/distance-metrics/dot-product-task.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.vectoraidb.actian.com/#organization\",\"name\":\"VectorAI DB\",\"url\":\"https://docs.vectoraidb.actian.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/actianvectorai/Ux78X2vdOXohKLon/logo/light.svg?fit=max\u0026auto=format\u0026n=Ux78X2vdOXohKLon\u0026q=85\u0026s=1b88940e85e690e376517438c937e9bd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.vectoraidb.actian.com#website\",\"name\":\"VectorAI DB\",\"url\":\"https://docs.vectoraidb.actian.com\",\"publisher\":{\"@id\":\"https://docs.vectoraidb.actian.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.vectoraidb.actian.com/docs/fundamentals/distance-metrics/dot-product-task#webpage\",\"url\":\"https://docs.vectoraidb.actian.com/docs/fundamentals/distance-metrics/dot-product-task\",\"name\":\"Configure dot product\",\"description\":\"Create a collection that measures alignment and magnitude efficiently.\",\"dateModified\":\"2026-07-17T09:44:19.405Z\",\"isPartOf\":{\"@id\":\"https://docs.vectoraidb.actian.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.vectoraidb.actian.com/docs/fundamentals/distance-metrics/dot-product-task#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.vectoraidb.actian.com/docs/fundamentals/distance-metrics/dot-product-task#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Distance metrics\",\"item\":\"https://docs.vectoraidb.actian.com/docs/fundamentals/distance-metrics/distance-metrics\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Configure dot product\",\"item\":\"https://docs.vectoraidb.actian.com/docs/fundamentals/distance-metrics/dot-product-task\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.vectoraidb.actian.com/docs/fundamentals/distance-metrics/dot-product-task#article\",\"headline\":\"Configure dot product\",\"name\":\"Configure dot product\",\"description\":\"Create a collection that measures alignment and magnitude efficiently.\",\"url\":\"https://docs.vectoraidb.actian.com/docs/fundamentals/distance-metrics/dot-product-task\",\"mainEntityOfPage\":{\"@id\":\"https://docs.vectoraidb.actian.com/docs/fundamentals/distance-metrics/dot-product-task#webpage\"},\"dateModified\":\"2026-07-17T09:44:19.405Z\",\"publisher\":{\"@id\":\"https://docs.vectoraidb.actian.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.vectoraidb.actian.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"VectorAI DB\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"VectorAI DB","nav":{"global":null,"tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":""}]},{"tab":"Fundamentals","groups":[{"group":"Collections","pages":[{"title":"Overview","href":"/docs/fundamentals"},{"title":"Collections overview","href":"/docs/fundamentals/collections/collections"},{"title":"Create a collection","icon":"code","href":"/docs/fundamentals/collections/create-collection-task"},{"title":"Get collection info","icon":"code","href":"/docs/fundamentals/collections/get-collection-info-task"},{"title":"Update collection parameters","icon":"code","href":"/docs/fundamentals/collections/update-collection-task"},{"title":"Delete a collection","icon":"code","href":"/docs/fundamentals/collections/delete-collection-task"},{"title":"Inspect and maintain collections","icon":"code","href":"/docs/fundamentals/collections/manage-collection-state-task"},{"title":"Collection workflow","icon":"code","href":"/docs/fundamentals/collections/complete-workflow"}]},{"group":"Points","pages":[{"title":"Points overview","href":"/docs/fundamentals/points/points"},{"title":"Insert points","icon":"code","href":"/docs/fundamentals/points/insert-points-task"},{"title":"Retrieve points","icon":"code","href":"/docs/fundamentals/points/retrieve-points-task"},{"title":"Update points","icon":"code","href":"/docs/fundamentals/points/update-points-task"},{"title":"Delete points","icon":"code","href":"/docs/fundamentals/points/delete-points-task"}]},{"group":"Vectors","pages":[{"title":"Vectors overview","href":"/docs/fundamentals/vectors/vectors"},{"title":"Store vectors","icon":"code","href":"/docs/fundamentals/vectors/create-vectors-task"},{"title":"Search with vectors","icon":"code","href":"/docs/fundamentals/vectors/search-vectors-task"}]},{"group":"Payload","pages":[{"title":"Payloads overview","href":"/docs/fundamentals/payload/payload"},{"title":"Update payloads","icon":"code","href":"/docs/fundamentals/payload/update-payload-task"}]},{"group":"Search","pages":[{"title":"Search overview","href":"/docs/fundamentals/search/search"},{"title":"Basic similarity search","icon":"code","href":"/docs/fundamentals/search/basic-search-task"},{"title":"Search with payload","icon":"code","href":"/docs/fundamentals/search/search-with-payload-task"},{"title":"Search with vectors","icon":"code","href":"/docs/fundamentals/search/search-with-vectors-task"}]},{"group":"Filtering","pages":[{"title":"Filtering overview","href":"/docs/fundamentals/filtering/filtering"},{"title":"Filter with must conditions","icon":"code","href":"/docs/fundamentals/filtering/must-filter-task"},{"title":"Filter with must-not conditions","icon":"code","href":"/docs/fundamentals/filtering/must-not-filter-task"},{"title":"Filter with should conditions","icon":"code","href":"/docs/fundamentals/filtering/should-filter-task"},{"title":"Combine filter types","icon":"code","href":"/docs/fundamentals/filtering/combined-filter-task"}]},{"group":"Semantic search","pages":[{"title":"Overview","href":"/docs/fundamentals/semantic-search/semantic-search"},{"title":"Pure semantic search","icon":"code","href":"/docs/fundamentals/semantic-search/pure-semantic-search-task"},{"title":"Filtered semantic search","icon":"code","href":"/docs/fundamentals/semantic-search/filtered-semantic-search-task"},{"title":"Score threshold search","icon":"code","href":"/docs/fundamentals/semantic-search/score-threshold-search-task"},{"title":"Multiconstraint search","icon":"code","href":"/docs/fundamentals/semantic-search/multi-constraint-search-task"},{"title":"Complete workflow","icon":"code","href":"/docs/fundamentals/semantic-search/complete-workflow"}]},{"group":"Hybrid search","pages":[{"title":"Overview","href":"/docs/fundamentals/hybrid-search/hybrid-search"},{"title":"Hybrid RAG retrieval","icon":"code","href":"/docs/fundamentals/hybrid-search/hybrid-rag-task"},{"title":"Fusion methods","icon":"code","href":"/docs/fundamentals/hybrid-search/fusion-methods"},{"title":"Multimodel fusion","icon":"code","href":"/docs/fundamentals/hybrid-search/multi-model-fusion-task"},{"title":"Query variation fusion","icon":"code","href":"/docs/fundamentals/hybrid-search/query-variation-task"},{"title":"Performance benchmarking","icon":"code","href":"/docs/fundamentals/hybrid-search/performance-benchmark-task"}]},{"group":"Distance metrics","pages":[{"title":"Distance metrics overview","href":"/docs/fundamentals/distance-metrics/distance-metrics"},{"title":"Configure cosine similarity","icon":"code","href":"/docs/fundamentals/distance-metrics/cosine-similarity-task"},{"title":"Configure Euclidean distance","description":"Create a collection that measures straight-line distance between vectors.","icon":"code","href":"/docs/fundamentals/distance-metrics/euclidean-distance-task"},{"title":"Configure dot product","icon":"code","href":"/docs/fundamentals/distance-metrics/dot-product-task"}]},{"group":"Indexing","pages":[{"title":"Indexing overview","description":"HNSW and flat index types in VectorAI DB, including tunable parameters and tradeoffs between speed, accuracy, and memory.","href":"/docs/fundamentals/indexing/indexing"},{"title":"Configure HNSW parameters","icon":"code","href":"/docs/fundamentals/indexing/configure-hnsw-task"}]}]},{"tab":"API","pages":[{"title":"API","href":"/api-reference/rest"}]},{"tab":"Academy","pages":[{"title":"Academy","href":"/academy"}]}]},"basePath":"","title":"Configure dot product - VectorAI DB","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":[],"chunks":[]}