Combine retrieval-augmented generation with cost-effective Chinese LLMs. DeepSeek for answers, Qwen for embeddings โ 90% cheaper than OpenAI.
Start Building RAG โEmbeddings from $0.02/M tokens, generation from $0.28/M. Process millions of documents without breaking the bank.
Chinese LLMs understand Chinese documents 3x better than Western models. Perfect for Asian market applications.
All models support 128K context windows, allowing retrieval of more relevant passages for better answers.
Works with ChatOpenAI and OpenAIEmbeddings โ just change the base URL. Full RAG pipeline support.
# pip install langchain langchain-openai faiss-cpu
from langchain_openai import ChatOpenAI, OpenAIEmbeddings
from langchain.vectorstores import FAISS
from langchain.chains import RetrievalQA
# Use Qwen Flash for cheap embeddings
embeddings = OpenAIEmbeddings(
model="qwen3.6-flash",
openai_api_key="your-key",
openai_api_base="https://eaf9553505eeb8f5-115-190-107-107.serveousercontent.com/v1"
)
# Use DeepSeek V4 for generation
llm = ChatOpenAI(
model="deepseek-v4",
openai_api_key="your-key",
openai_api_base="https://eaf9553505eeb8f5-115-190-107-107.serveousercontent.com/v1"
)
# Build your RAG pipeline
vectorstore = FAISS.from_documents(docs, embeddings)
qa = RetrievalQA.from_chain_type(
llm=llm,
retriever=vectorstore.as_retriever(search_kwargs={"k": 5})
)
# Ask questions about your documents
answer = qa.run("What is the refund policy?")
| Operation | OpenAI | AI Token (Chinese) | Savings |
|---|---|---|---|
| 1M embedding tokens | $0.10 | $0.02 | 80% |
| 1M generation tokens | $2.50 | $0.28 | 89% |
| 10K queries/month | ~$300 | ~$35 | 88% |