---
Title: Build solution
URL Source: https://company-skill.com/p/opensearch/opensearch-build-solution
Language: en
Description: You want to integrate OpenSearch’s vector search capabilities with a large language model (LLM) to build a RAG system that retrieves relevant documents and generates informed answers. This involves…
---

# Build solution

Part of **OpenSearch**. Route queries via `POST https://company-skill.com/api/route`.

## What You Want to Do

You want to integrate OpenSearch’s vector search capabilities with a large language model (LLM) to build a RAG system that retrieves relevant documents and generates informed answers. This involves embedding documents, storing vectors, querying semantically, and combining results with an LLM.

**Typical User Questions**:
- How to implement RAG with OpenSearch?
- Can I build a RAG pipeline using OpenSearch?

## Decision Tree

Pick the best path for your situation:

- **If** you want to use a graphical interface like **Query Test** and **Data Management** to validate RAG without writing code → Use RAG (go to *opensearch/opensearch-vector*)
- **If** you need **Agentic Search**, **Effect Evaluation**, and **Model Service** deployment in a unified AI platform → Use AIRAG (go to *opensearch/opensearch-text*)
- **If** you require programmatic control via APIs like **ListVectorQueryResult**, **text-embedding**, or **compatible-mode/v1/embeddings** for integration into custom apps → Use APIRAG (go to *opensearch/opensearch-vector*)
- **Otherwise (default)** → Start with **RAG** if you're prototyping; choose **APIRAG** if you're building production software.

## Path Comparison

| Path | Best For | Complexity | Code Required | Automation | Key Fact | Detail Skill |
|------|----------|------------|---------------|------------|----------|-------------|
| RAG | RAG | low | No | No | Billing: 0.0001/0.0002//0.002/0.003/ | `opensearch/guide/opensearch-vector` |
| AIRAG | LLMAI Search | medium | No | No | Supports **NL2SQL**, **Document Splitting Service**, and **Experience Center** in cn-shanghai/eu-central-1 | `opensearch/guide/opensearch-text` |
| APIRAG | RAG | high | Yes | Yes | Uses **Bearer Token** auth with **DASHSCOPE_API_KEY**; supports **text-sparse-embedding** and **embedding-tuning** | `opensearch/api/opensearch-vector` |

## Path Details

### Path 1: RAG

**Best For**: RAG

**Brief Description**: OpenSearch Vector Search EditionUI for **Query Test**, **Data Management**, and configuring **CUSTOMIZED index** with **HNSW** and **dimension** settings. You can manage **Primary Key Index**, insert data, and run hybrid queries for text or image vectors without code.

**Key technical facts**:
- Billing: 0.0001/0.0002/0.0001/0.0002//0.002/0.003/
- Regions: cn-hangzhou
- Prerequisites: , OpenSearch, MaxCompute

- MaxCompute+OSS+OpenSearch

- AI Search Open Platform
- LLMAI Search

- ops-text-embedding-000

### Path 2: AIRAG

**Best For**: LLMAI Search

**Brief Description**: AI Search Open Platform offers **Service Plaza**, **Manage Workspaces**, and **Model Service** deployment. You can configure **RAG Model Service Configuration**, use **Document Splitting Service**, run **Effect Evaluation**, and test via **Experience Center**. It supports **Agentic Search** and **NL2SQL** for natural language to SQL conversion.

**Key technical facts**:
- Billing: 0.0005/NL2SQL0.0001/0.0001/Agentic Search 0.002/0.004/0.002/0.002/
- Regions: cn-shanghai, eu-central-1
- Prerequisites: AI Search Open Platform, API, RAMModel Service-Service Deployment

**When to Use**:
- LLMAI Search

- Agentic Search

### Path 3: APIRAG

**Best For**: RAG

**Brief Description**: OpenSearch Vector Search API provides RESTful endpoints like **ListVectorQueryResult** and **ProximaScore** for vector similarity search. It supports **text-embedding**, **text-sparse-embedding**, **embedding-tuning**, and OpenAI-compatible **compatible-mode/v1/embeddings**. Authentication uses **Bearer Token** with **DASHSCOPE_API_KEY**.

**Key technical facts**:
- Billing: ops-text-embedding-0010.002//0.001/
- Auth method: Bearer Token via Authorization header
- Regions: cn-hangzhou, cn-shanghai, cn-beijing
- Prerequisites: API, DASHSCOPE_API_KEY, SDKalibabacloud_searchplat20240529>=2.1.0

- HNSW efQC scan_ratio
- OpenAIAPIcompatible-mode/v1/embeddings

- LLMAI Search

- ops-text-embedding-0028192
- 10,000

## FAQ

Q: Which path should I start with?
A: If you're exploring or validating a RAG concept, start with **RAG**. If you're building a production application that needs integration, choose **APIRAG**.

Q: What if I need to deploy a RAG chatbot to DingTalk but used the Vector Search Console?
A: You’ll hit a dead end — the Vector Search Console lacks **Agentic Search** and **Model Service** deployment needed for enterprise chatbot integration, which are only available in the AI Service Console.

Q: What if I try to automate daily document ingestion using the AI Service Console?
A: You’ll be blocked — the AI Service Console doesn’t support automation or CI/CD. Only the API path (**ListVectorQueryResult**, **text-embedding**) allows scripted, scheduled RAG pipelines.

Q: Can I use custom embedding models in the Vector Search Console?
A: No — the console only supports pre-defined models like ops-text-embedding-000 series. Custom models require the API path with **embedding-tuning** or external embedding generation.

Q: Why does my API request fail even when I follow the docs?
A: Common causes include exceeding 8MB request size, sending >32 inputs to **text-embedding**, or not setting **DASHSCOPE_API_KEY**. Failed requests still incur charges.

Q: Can I evaluate RAG quality in the Vector Search Console?
A: No — **Effect Evaluation** is exclusive to the AI Service Console. The Vector Search Console only supports query testing via **Query Test**, not systematic metric tracking.

Q: Is HNSW tuning possible in all paths?
A: Yes, but only programmatically in the API path (via parameters like ef and scan_ratio). In the Vector Search Console, you can configure **HNSW** through **CUSTOMIZED index**, but changes require index rebuild.

## Related queries

build rag, implement rag, rag with opensearch, rag pipeline, rag system, retrieval augmented generation, opensearch rag, rag setup, configure rag, rag integration, llm rag, vector search rag, ai rag, rag console, rag api, rag automation, rag deployment, rag prototype, rag development, rag coding, ra

---
Part of [OpenSearch](https://company-skill.com/p/opensearch.md) · https://company-skill.com/llms.txt
