Semantic search that understands meaning, not just keywords.
The problem
Keyword search misses results that use different words for the same idea. “How do I get my money back” may not match a page titled “Refund policy.”
Why Ragrails fits
Ragrails can run retrieval without answer generation. That means you can build semantic search with no LLM generation cost, then add reranking when result order matters.
Use items[].text, items[].metadata, score, and rerank_score
Sample
result = rag.retrieve( "how do I get my money back", top_k=20, use_rerank=True, rerank_top_k=5,)for hit in result.items: print(hit.rerank_score, hit.metadata.get("title"), hit.text[:120])
ragrails retrieve "how do I get my money back" \ --vector-db qdrant \ --collection docs \ --url http://localhost:6333 \ --provider voyage \ --model voyage-3 \ --top-k 20 \ --rerank \ --rerank-top-k 5
curl -X POST http://127.0.0.1:8000/v1/retrieve \ -H "Content-Type: application/json" \ -d '{ "query": "how do I get my money back", "provider": "voyage", "model": "voyage-3", "vector_db": "qdrant", "collection": "docs", "url": "http://localhost:6333", "top_k": 20, "use_rerank": true, "rerank_top_k": 5 }'
Result card shape
{ "title": "Refund policy", "snippet": "Refunds are available within 30 days...", "score": 0.76, "rerank_score": 0.93, "source": "policy/refunds.md"}
Add Chat later when you want generated answers over the same index.
⌘I
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"Ragrails","colors":{"primary":"#7856FF","light":"#7856FF","dark":"#7856FF"},"logo":{"light":"https://mintcdn.com/ragrails/JOQRbAGYjkc00mAt/images/logo/ragrails-logo-black.png?fit=max\u0026auto=format\u0026n=JOQRbAGYjkc00mAt\u0026q=85\u0026s=6d3c84122d3169cf7d0bac554b4c627f","dark":"https://mintcdn.com/ragrails/JOQRbAGYjkc00mAt/images/logo/ragrails-logo-white.png?fit=max\u0026auto=format\u0026n=JOQRbAGYjkc00mAt\u0026q=85\u0026s=470dff18d9f5f677c0f38558aa1fdb08","href":"/"},"favicon":"https://mintcdn.com/ragrails/JOQRbAGYjkc00mAt/images/logo/ragrails-logo-icon.png?fit=max\u0026auto=format\u0026n=JOQRbAGYjkc00mAt\u0026q=85\u0026s=b88ed46c962ab2e7abbc2d892b3446de","navbar":{"links":[{"icon":"github","href":"https://github.com/samowolabi/ragrails","label":"Star on GitHub"}]},"icons":{"library":"lucide"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ragrails","hasAudioNarration":false,"actualSubdomain":"ragrails","customDomains":["docs.ragrails.com"],"gitSource":{"type":"github","owner":"samowolabi","repo":"ragrails-documentation","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aa919af007ed13b01e58ce4","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"Documentation","count":37},{"language":"default","tag":"Pipeline","count":28},{"language":"default","tag":"Reference","count":18},{"language":"default","tag":"Get Started","count":13},{"language":"default","tag":"CLI","count":13},{"language":"default","tag":"SDK","count":12},{"language":"default","tag":"REST API","count":12},{"language":"default","tag":"Features","count":11},{"language":"default","tag":"Capabilities","count":10},{"language":"default","tag":"Workflows","count":8}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"@font-face{font-family:\"PP Neue Montreal\";src:url(\"/fonts/ppneuemontreal-thin.woff\") format(\"woff\");font-weight:100 300;font-style:normal;font-display:swap}@font-face{font-family:\"PP Neue Montreal\";src:url(\"/fonts/ppneuemontreal-book.woff\") format(\"woff\");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:\"PP Neue Montreal\";src:url(\"/fonts/ppneuemontreal-italic.woff\") format(\"woff\");font-weight:400;font-style:italic;font-display:swap}@font-face{font-family:\"PP Neue Montreal\";src:url(\"/fonts/ppneuemontreal-medium.woff\") format(\"woff\");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:\"PP Neue Montreal\";src:url(\"/fonts/ppneuemontreal-semibolditalic.woff\") format(\"woff\");font-weight:600;font-style:italic;font-display:swap}@font-face{font-family:\"PP Neue Montreal\";src:url(\"/fonts/ppneuemontreal-bold.woff\") format(\"woff\");font-weight:600 800;font-style:normal;font-display:swap}body{font-family:\"PP Neue Montreal\", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,\n \"Segoe UI\", sans-serif!important;letter-spacing:0.01em}h1,h2,h3,h4,h5,h6{font-family:\"PP Neue Montreal\", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,\n \"Segoe UI\", sans-serif!important;letter-spacing:0.015em}"}],"page":{"pagePath":"use-cases/ai-search-engine","slug":"/use-cases/ai-search-engine","pageMetadata":{"title":"AI Search Engine","icon":"search","description":"Semantic search that understands meaning, not just keywords.","href":"/use-cases/ai-search-engine"},"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: \"Semantic search that understands meaning, not just keywords.\"\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={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Table,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`the-problem`,children:`The problem`}),`\n`,_jsx(_components.p,{children:`Keyword search misses results that use different words for the same idea. “How do I get my money back” may not match a page titled “Refund policy.”`}),`\n`,_jsx(Heading,{level:`2`,id:`why-ragrails-fits`,children:`Why Ragrails fits`}),`\n`,_jsx(_components.p,{children:`Ragrails can run retrieval without answer generation. That means you can build semantic search with no LLM generation cost, then add reranking when result order matters.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Need`}),_jsx(_components.th,{children:`Ragrails capability`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Meaning-based search`}),_jsxs(_components.td,{children:[_jsx(_components.a,{href:`/features/embedding`,children:`Embedding`}),` and `,_jsx(_components.a,{href:`/features/retrieval`,children:`Retrieval`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Better ordering`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/capabilities/reranking`,children:`Reranking`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`No generated answer`}),_jsxs(_components.td,{children:[`Use `,_jsx(_components.code,{children:`retrieve()`}),` or `,_jsx(_components.code,{children:`query()`}),` instead of `,_jsx(_components.code,{children:`chat()`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Structured result cards`}),_jsxs(_components.td,{children:[`Use `,_jsx(_components.code,{children:`items[].text`}),`, `,_jsx(_components.code,{children:`items[].metadata`}),`, `,_jsx(_components.code,{children:`score`}),`, and `,_jsx(_components.code,{children:`rerank_score`})]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`sample`,children:`Sample`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`SDK`,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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` rag.retrieve(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"how do I get my money back\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` top_k`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` use_rerank`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` rerank_top_k`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_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:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hit `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result.items:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(hit.rerank_score, hit.metadata.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), hit.text[:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`120`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`CLI`,numberOfLines:`9`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ragrails`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` retrieve`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"how do I get my money back\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --vector-db`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` qdrant`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --collection`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` docs`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` http://localhost:6333`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --provider`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` voyage`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --model`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` voyage-3`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --top-k`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 20`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --rerank`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --rerank-top-k`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 5`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`REST API`,numberOfLines:`13`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` http://127.0.0.1:8000/v1/retrieve`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"query\": \"how do I get my money back\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"provider\": \"voyage\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"voyage-3\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vector_db\": \"qdrant\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"collection\": \"docs\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"url\": \"http://localhost:6333\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"top_k\": 20,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"use_rerank\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"rerank_top_k\": 5`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`result-card-shape`,children:`Result card shape`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Refund policy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"snippet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Refunds are available within 30 days...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"score\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.76`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rerank_score\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.93`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"policy/refunds.md\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Tip,{children:[`Add `,_jsx(_components.a,{href:`/features/chat`,children:`Chat`}),` later when you want generated answers over the same index.`]})]})}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":"AI Search Engine","icon":"search","description":"Semantic search that understands meaning, not just keywords.","href":"/use-cases/ai-search-engine"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"The problem","slug":"the-problem","depth":2,"children":[]},{"title":"Why Ragrails fits","slug":"why-ragrails-fits","depth":2,"children":[]},{"title":"Sample","slug":"sample","depth":2,"children":[]},{"title":"Result card shape","slug":"result-card-shape","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"ragrails","siteName":"Ragrails","title":"AI Search Engine - Ragrails","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-06-23T18:36:08.018Z","originalFileLocation":"use-cases/ai-search-engine.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=\"Semantic search that understands meaning, not just keywords.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Ragrails\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ragrails/uaqHFVx6vURFDMk0/_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/ragrails/uaqHFVx6vURFDMk0/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ragrails/uaqHFVx6vURFDMk0/_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/ragrails/uaqHFVx6vURFDMk0/_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/ragrails/uaqHFVx6vURFDMk0/_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/ragrails/uaqHFVx6vURFDMk0/_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/ragrails/uaqHFVx6vURFDMk0/_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/ragrails/uaqHFVx6vURFDMk0/_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/ragrails/uaqHFVx6vURFDMk0/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"AI Search Engine - Ragrails\">\u003cmeta data-mint-head property=\"og:description\" content=\"Semantic search that understands meaning, not just keywords.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Ragrails\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.ragrails.com/use-cases/ai-search-engine\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ragrails.mintlify.site/_mintlify/api/og/v2?division=Use+Cases\u0026amp;title=AI+Search+Engine\u0026amp;description=Semantic+search+that+understands+meaning%2C+not+just+keywords.\u0026amp;theme=5eca8935571807ec81b224d4\u0026amp;signature=c83747c2a19721f67886d36d310cc54f5ce875f2dd44e6bfdb32951720abf8a3\">\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=\"AI Search Engine - Ragrails\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Semantic search that understands meaning, not just keywords.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ragrails.mintlify.site/_mintlify/api/og/v2?division=Use+Cases\u0026amp;title=AI+Search+Engine\u0026amp;description=Semantic+search+that+understands+meaning%2C+not+just+keywords.\u0026amp;theme=5eca8935571807ec81b224d4\u0026amp;signature=c83747c2a19721f67886d36d310cc54f5ce875f2dd44e6bfdb32951720abf8a3\">\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/ragrails/uaqHFVx6vURFDMk0/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Ragrails\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#7856FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.ragrails.com/use-cases/ai-search-engine\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/use-cases/ai-search-engine.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.ragrails.com/#organization\",\"name\":\"Ragrails\",\"url\":\"https://docs.ragrails.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/ragrails/JOQRbAGYjkc00mAt/images/logo/ragrails-logo-black.png?fit=max\u0026auto=format\u0026n=JOQRbAGYjkc00mAt\u0026q=85\u0026s=6d3c84122d3169cf7d0bac554b4c627f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.ragrails.com#website\",\"name\":\"Ragrails\",\"url\":\"https://docs.ragrails.com\",\"publisher\":{\"@id\":\"https://docs.ragrails.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.ragrails.com/use-cases/ai-search-engine#webpage\",\"url\":\"https://docs.ragrails.com/use-cases/ai-search-engine\",\"name\":\"AI Search Engine\",\"description\":\"Semantic search that understands meaning, not just keywords.\",\"dateModified\":\"2026-06-23T18:36:08.018Z\",\"isPartOf\":{\"@id\":\"https://docs.ragrails.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.ragrails.com/use-cases/ai-search-engine#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.ragrails.com/use-cases/ai-search-engine#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Use Cases\",\"item\":\"https://docs.ragrails.com/use-cases/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI Search Engine\",\"item\":\"https://docs.ragrails.com/use-cases/ai-search-engine\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.ragrails.com/use-cases/ai-search-engine#article\",\"headline\":\"AI Search Engine\",\"name\":\"AI Search Engine\",\"description\":\"Semantic search that understands meaning, not just keywords.\",\"url\":\"https://docs.ragrails.com/use-cases/ai-search-engine\",\"mainEntityOfPage\":{\"@id\":\"https://docs.ragrails.com/use-cases/ai-search-engine#webpage\"},\"dateModified\":\"2026-06-23T18:36:08.018Z\",\"publisher\":{\"@id\":\"https://docs.ragrails.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.ragrails.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Ragrails\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Ragrails\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/use-cases/ai-search-engine.md","siteName":"Ragrails","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Get Started","pages":[{"title":"Overview","icon":"house","href":""},{"title":"Installation","icon":"download","href":"/getting-started/installation"},{"title":"Quickstart","icon":"zap","href":"/getting-started/quickstart"},{"title":"How RAG Works","icon":"book-open","href":"/getting-started/concepts"},{"title":"Configuration","icon":"settings","href":"/getting-started/configuration"},{"title":"Environment Variables","icon":"key","href":"/getting-started/env-examples"}]},{"group":"Features","pages":[{"title":"Overview","icon":"layers","href":"/features/overview"},{"group":"Workflows","icon":"workflow","expanded":true,"pages":[{"title":"Ingest","icon":"package-plus","href":"/features/ingest"},{"title":"Query","icon":"search-check","href":"/features/query"}]},{"group":"Pipeline","icon":"route","expanded":true,"pages":[{"title":"Overview","icon":"route","href":"/features/pipeline-overview"},{"title":"Extraction","icon":"file-input","href":"/features/extraction"},{"title":"Chunking","icon":"scissors","href":"/features/chunking"},{"title":"Embedding","icon":"binary","href":"/features/embedding"},{"title":"Storing","icon":"database","href":"/features/storing"},{"title":"Retrieval","icon":"search","href":"/features/retrieval"},{"title":"Chat","icon":"messages-square","href":"/features/chat"}]},{"title":"Keep Your Knowledge Base Current","icon":"refresh-cw","href":"/features/knowledge-base-maintenance"}]},{"group":"Capabilities","pages":[{"title":"Overview","icon":"sliders-horizontal","href":"/capabilities/overview"},{"title":"Reranking","icon":"arrow-up-narrow-wide","href":"/capabilities/reranking"},{"title":"Query Rewriting","icon":"wand-sparkles","href":"/capabilities/query-rewriting"},{"title":"Chat Tuning","icon":"sliders-horizontal","href":"/capabilities/chat-tuning"},{"title":"Streaming","icon":"radio","href":"/capabilities/streaming"},{"title":"Resilient Ingestion","icon":"refresh-cw","href":"/capabilities/resilient-ingestion"},{"title":"Agentic Tools","icon":"bot","href":"/capabilities/agentic-tools"},{"title":"Tool Calling","icon":"wrench","href":"/capabilities/tool-calling"},{"title":"Custom Providers","icon":"puzzle","href":"/capabilities/custom-providers"},{"title":"Cost Optimization","icon":"coins","href":"/capabilities/cost-optimization"}]},{"group":"Use Cases","pages":[{"title":"Use Cases","icon":"sparkles","href":"/use-cases/overview"},{"title":"AI Support Agent","icon":"headset","href":"/use-cases/ai-support-agent"},{"title":"Documentation Assistant","icon":"book","href":"/use-cases/documentation-assistant"},{"title":"Internal Knowledge Base","icon":"building","description":"Private Q\u0026A over scattered company files.","href":"/use-cases/internal-knowledge-base"},{"title":"AI Search Engine","icon":"search","href":"/use-cases/ai-search-engine"},{"title":"Developer / API Copilot","icon":"code","description":"Answer questions about your API docs, then use interactive tools when users want to act.","href":"/use-cases/developer-api-copilot"}]},{"group":"Walkthroughs","pages":[{"title":"Build From a Website","icon":"globe","href":"/guides/website-to-rag"},{"title":"Build From Documents","icon":"file-text","href":"/guides/docs-to-rag"},{"title":"Build From an API","icon":"plug","href":"/guides/api-to-rag"},{"title":"Run the REST API","icon":"server","href":"/guides/hosted-rest-api"}]}]},{"tab":"SDK","pages":[{"title":"SDK","href":"/usage/sdk/overview"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/usage/cli/overview"}]},{"tab":"REST API","pages":[{"title":"REST API","href":"/usage/server/overview"}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/reference/sdk"}]}]},"basePath":"","title":"AI Search Engine - Ragrails","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":[],"chunks":[]}