{"schemaVersion":1,"resourceType":"connector","slug":"embed","name":"Embed","catalog":"embed","description":"Turn text into embedding vectors on your own machine and rank it by cosine similarity for semantic search and RAG","language":"Python","categories":["ai"],"repository":"https://github.com/Query-farm/vgi-embed","license":"MIT","generatedAt":"2026-12-01T18:22:16+00:00","runtime":{"engineVersion":"2.0.1","protocolVersion":"3.4"},"release":{"tag":"v0.6.0","publishedAt":"2026-11-25T17:40:19Z","url":"https://github.com/Query-farm/vgi-embed/releases/tag/v0.6.0"},"links":{"html":"https://query.farm/products/orchard/connectors/embed/","llms":"https://query.farm/products/orchard/connectors/embed/llms.txt","markdown":"https://query.farm/products/orchard/connectors/embed/index.md","json":"https://query.farm/products/orchard/api/v1/connectors/embed.json","objects":"https://query.farm/products/orchard/api/v1/connectors/embed/objects.json","search":"https://query.farm/products/orchard/api/v1/search.json?kind=object&connector=embed&q={query}"},"authentication":{"mode":"none_declared","guidance":"No service credentials are declared by this connector. Individual datasets, input files or deployments may have their own prerequisites.","interpretation":"Secret parameter required flags describe the upstream declaration; they do not override the service-level mode above. Keep secrets in environment variables or the deployment secret store. SQL values in angle brackets are placeholders, not automatic environment lookups. Native DuckDB and Haybarn 2.0.1 do not provide a SQL getenv() function, even when worker-supplied snippets mention it. Read environment variables in your application and pass credential values through client parameter bindings (for example, Python con.execute(\"CREATE SECRET stripe (TYPE stripe, api_key ?)\", [os.environ[\"STRIPE_API_KEY\"]]) after attaching the connector. Omit unused optional parameters and keep real values out of saved SQL and logs.","secrets":[]},"deployment":{"local":{"methods":[{"id":"uvx","label":"uvx","icon":"simple-icons:python","steps":[{"title":"Attach with uvx","description":"Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.","lang":"sql","code":"ATTACH 'embed' AS embed (\n  TYPE vgi,\n  LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-embed@v0.6.0 vgi-embed-worker'\n);"}]},{"id":"docker","label":"Docker","icon":"simple-icons:docker","steps":[{"title":"Attach the signed image","description":"Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.","lang":"sql","code":"ATTACH 'embed' AS embed (\n  TYPE vgi,\n  LOCATION 'oci://ghcr.io/query-farm/vgi-embed:0.6.0'\n);"}]}],"pinnedMethods":[{"id":"uvx","label":"uvx","icon":"simple-icons:python","steps":[{"title":"Attach with uvx","description":"Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.","lang":"sql","code":"ATTACH 'embed' AS embed (\n  TYPE vgi,\n  LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-embed@v0.6.0 vgi-embed-worker'\n);"}]},{"id":"docker","label":"Docker","icon":"simple-icons:docker","steps":[{"title":"Attach the signed image","description":"Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.","lang":"sql","code":"ATTACH 'embed' AS embed (\n  TYPE vgi,\n  LOCATION 'oci://ghcr.io/query-farm/vgi-embed:0.6.0'\n);"}]}]},"selfHost":{"instructions":"https://github.com/Query-farm/vgi-embed","connectionGuide":"https://query.farm/vgi/connect-to-a-worker/","guidance":"Deploy using the connector repository instructions and use its supported HTTP or SSH transport. Replace example URLs with your actual deployment; configure its authentication."},"queryFarm":{"available":true,"console":"https://auth.queryfarm.cloud/console/new?worker=embed","organizationMonthlyMinimumUsd":10,"pricing":"https://query.farm/products/orchard/hosted/"},"publicDemo":null},"setup":{"extensions":{"duckdb":"SET allow_extension_repositories = 'allowed';\n\nCREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm\n    WITH PREFIX 'https://duckdb-extensions.query.farm';\n\nINSTALL vgi FROM query_farm;\nLOAD vgi FROM query_farm;","haybarn":"INSTALL vgi FROM community;\nLOAD vgi;"},"attachSql":"ATTACH 'embed' AS embed (\n  TYPE vgi,\n  LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-embed@v0.6.0 vgi-embed-worker'\n);","attachOptions":[],"note":"Install and load VGI, attach the connector using the catalog alias shown here, then create required secrets. Replace placeholders and omit unused optional secret parameters. Satisfy file, network and credential prerequisites before executing a query."},"example":{"title":"Find the support articles that answer a question","sql":"WITH docs(id, body) AS (VALUES (1, 'Reset your password from the account settings page.'), (2, 'Our office is closed on public holidays.'), (3, 'Invoices are emailed on the first day of each month.'), (4, 'Forgot your login? Use the password recovery link to sign in again.')), q AS (SELECT embed.main.embed_query('how do I reset my password') AS v) SELECT d.id, d.body, ROUND(embed.main.similarity(q.v, embed.main.embed_passage(d.body)), 3) AS score FROM docs AS d CROSS JOIN q ORDER BY score DESC, d.id LIMIT 2","requiresCredentials":null,"note":null,"objects":[{"name":"embed.main.embed_query","kind":"scalar_function","links":{"html":"https://query.farm/products/orchard/connectors/embed/#obj-main-embed_query","markdown":"https://query.farm/products/orchard/connectors/embed/objects/scalar_function.bWFpbg.ZW1iZWRfcXVlcnk.md","json":"https://query.farm/products/orchard/api/v1/connectors/embed/objects/scalar_function.bWFpbg.ZW1iZWRfcXVlcnk.json"}},{"name":"embed.main.similarity","kind":"scalar_function","links":{"html":"https://query.farm/products/orchard/connectors/embed/#obj-main-similarity","markdown":"https://query.farm/products/orchard/connectors/embed/objects/scalar_function.bWFpbg.c2ltaWxhcml0eQ.md","json":"https://query.farm/products/orchard/api/v1/connectors/embed/objects/scalar_function.bWFpbg.c2ltaWxhcml0eQ.json"}},{"name":"embed.main.embed_passage","kind":"scalar_function","links":{"html":"https://query.farm/products/orchard/connectors/embed/#obj-main-embed_passage","markdown":"https://query.farm/products/orchard/connectors/embed/objects/scalar_function.bWFpbg.ZW1iZWRfcGFzc2FnZQ.md","json":"https://query.farm/products/orchard/api/v1/connectors/embed/objects/scalar_function.bWFpbg.ZW1iZWRfcGFzc2FnZQ.json"}}],"evidence":{"status":"captured_result","capturedAt":"2026-12-01T06:12:39+00:00","engineVersion":"2.0.1","protocolVersion":"3.4.0","releaseTag":"v0.6.0","sample":{"columns":["id","body","score"],"types":["INTEGER","VARCHAR","DOUBLE"],"rows":[[1,"Reset your password from the account settings page.",0.831],[4,"Forgot your login? Use the password recovery link to sign in again.",0.773]],"more":false}},"artifact":null},"objects":{"total":7,"index":"https://query.farm/products/orchard/api/v1/connectors/embed/objects.json","search":"https://query.farm/products/orchard/api/v1/search.json?kind=object&connector=embed&q={query}"},"agentTasks":["The default model is BAAI/bge-small-en-v1.5. Does it produce 384-dimensional embedding vectors? Return a single boolean.","List the names of every embedding model this worker supports.","Confirm that a piece of text is maximally similar to itself: compute the cosine similarity of the embedding of the word 'database' with itself, rounded to 3 decimal places.","Is the word 'dog' more semantically similar to 'puppy' than to 'airplane'? Return a single boolean.","Does the model 'BAAI/bge-base-en-v1.5' produce 768-dimensional embedding vectors? Return a single boolean.","Using the retrieval embedding functions, is the search query 'how do I reset my password' more similar to the passage 'Reset your password from the account settings page.' than to the passage 'The weather today is sunny and warm.'? Return a single boolean.","Run a semantic search over these four passages: 'Water boils at 100 degrees Celsius at sea level.', 'The Eiffel Tower is located in Paris, France.', 'Python is a popular programming language.', 'Mount Everest is the tallest mountain on Earth.'. Using the retrieval embedding functions, which passage best answers the search query 'where is the eiffel tower'? Return one row with one VARCHAR column: the passage text.","Classify each of these support tickets into the closest of the labels 'shipping delay', 'payment error', 'feature request' by embedding similarity between the ticket text and the label text: 'My package never arrived and tracking has not updated in a week.', 'The checkout page shows an error when I enter my card.', 'Please let me export my reports as CSV.'. Return one row per ticket with two VARCHAR columns: the ticket text and its label."],"provenance":{"generatedAt":"2026-12-01T18:22:16+00:00","repository":"https://github.com/Query-farm/vgi-embed","harvest":{"status":"ok","method":"subprocess","error":null,"vgi_version":"9773130dde"},"catalogVerification":{"verified":true,"status":"passed","total":2,"passed":2,"failed":0,"needs_credentials":0,"location":"uvx --from git+https://github.com/Query-farm/vgi-embed@v0.6.0 vgi-embed-worker","transport":"subprocess","environment":{"vgi_extension_version":"9773130dde","haybarn_version":"2.0.1rc3","engine_version":"v2.0.1","python":"3.12.4","platform":"darwin_arm64","protocol_version":"3.4.0"},"checked_at":"2026-12-01T06:12:21+00:00"},"interpretation":"Catalog verification records the harvest environment. It is not proof that every query or current live API call succeeds. Only an example with captured_result has a saved result for that exact SQL."},"interpretation":["Missing, null, or undeclared metadata means unknown; do not invent defaults, credential scope, platform support or endpoint URLs.","Search is keyword retrieval, not proof of a capability. Read the exact object declaration before generating SQL.","A table and a table function can have the same name. Preserve parentheses and use the matching overload and schema.","Service credentials, external data availability and deployment authentication are separate requirements."]}