{"id":527,"date":"2026-06-25T13:21:47","date_gmt":"2026-06-25T05:21:47","guid":{"rendered":"https:\/\/www.eshowai.com\/index.php\/2026\/06\/25\/rag-%e5%85%a5%e9%97%a8%e5%88%b0%e5%ae%9e%e6%88%98%ef%bc%9a3-%e5%a4%a9%e6%90%ad%e4%b8%80%e4%b8%aa%e4%bc%81%e4%b8%9a%e7%9f%a5%e8%af%86%e5%ba%93%e9%97%ae%e7%ad%94%e7%b3%bb%e7%bb%9f%ef%bc%882026-%e5%ae%8c\/"},"modified":"2026-07-09T16:44:31","modified_gmt":"2026-07-09T08:44:31","slug":"rag-%e5%85%a5%e9%97%a8%e5%88%b0%e5%ae%9e%e6%88%98%ef%bc%9a3-%e5%a4%a9%e6%90%ad%e4%b8%80%e4%b8%aa%e4%bc%81%e4%b8%9a%e7%9f%a5%e8%af%86%e5%ba%93%e9%97%ae%e7%ad%94%e7%b3%bb%e7%bb%9f%ef%bc%882026-%e5%ae%8c","status":"publish","type":"post","link":"https:\/\/www.eshowai.com\/index.php\/2026\/06\/25\/rag-%e5%85%a5%e9%97%a8%e5%88%b0%e5%ae%9e%e6%88%98%ef%bc%9a3-%e5%a4%a9%e6%90%ad%e4%b8%80%e4%b8%aa%e4%bc%81%e4%b8%9a%e7%9f%a5%e8%af%86%e5%ba%93%e9%97%ae%e7%ad%94%e7%b3%bb%e7%bb%9f%ef%bc%882026-%e5%ae%8c\/","title":{"rendered":"RAG \u5165\u95e8\u5230\u5b9e\u6218\uff1a3 \u5929\u642d\u4e00\u4e2a\u4f01\u4e1a\u77e5\u8bc6\u5e93\u95ee\u7b54\u7cfb\u7edf\uff082026 \u5b8c\u6574\u7248\uff09"},"content":{"rendered":"<figure><img decoding=\"async\" src=\"https:\/\/www.eshowai.com\/wp-content\/uploads\/2026\/07\/21-rag-3-days-enterprise-cover-6.png\" alt=\"21-rag-3-days-enterprise-cover.png\" \/><figcaption>RAG \u5165\u95e8\u5230\u5b9e\u6218\u5c01\u9762<\/figcaption><\/figure>\n<h1>RAG \u5165\u95e8\u5230\u5b9e\u6218:3 \u5929\u642d\u4e00\u4e2a\u4f01\u4e1a\u77e5\u8bc6\u5e93\u95ee\u7b54\u7cfb\u7edf(2026 \u5b8c\u6574\u7248)<\/h1>\n<blockquote>\n<p>\u5206\u7c7b:AI \u6280\u672f (ai-tech) | \u6807\u7b7e:RAG\u3001\u5927\u6a21\u578b\u3001\u77e5\u8bc6\u5e93\u3001\u5411\u91cf\u6570\u636e\u5e93\u3001LangChain<\/p>\n<\/blockquote>\n<p><strong>RAG(Retrieval-Augmented Generation)\u662f 2026 \u5e74\u4f01\u4e1a\u7528\u5927\u6a21\u578b\u7684\u6838\u5fc3\u6280\u672f\u3002<\/strong><\/p>\n<p>\u7b80\u5355\u8bf4:\u8ba9 AI <strong>\u5148\u67e5\u4f60\u516c\u53f8\u7684\u8d44\u6599,\u518d\u56de\u7b54\u95ee\u9898<\/strong>\u3002<\/p>\n<p>\u8fd9\u6837 AI \u4e0d\u4f1a\u778e\u7f16(\u5e7b\u89c9),\u7b54\u6848<strong>100% \u6765\u81ea\u4f60\u7684\u6587\u6863<\/strong>\u3002<\/p>\n<p>\u8fd9\u7bc7\u5e26\u4f60 <strong>3 \u5929\u4ece 0 \u642d\u4e00\u4e2a\u4f01\u4e1a\u77e5\u8bc6\u5e93\u95ee\u7b54\u7cfb\u7edf<\/strong>:<\/p>\n<ul>\n<li><strong>Day 1<\/strong>:\u6587\u6863\u5904\u7406(\u4e0a\u4f20\/\u5206\u6bb5\/\u5411\u91cf\u5316)<\/li>\n<li><strong>Day 2<\/strong>:\u667a\u80fd\u95ee\u7b54(\u68c0\u7d22 + \u751f\u6210)<\/li>\n<li><strong>Day 3<\/strong>:\u90e8\u7f72\u4e0a\u7ebf(API + Web UI)<\/li>\n<\/ul>\n<p><strong>\u5b8c\u6574\u4ee3\u7801 + \u90e8\u7f72\u6307\u5357,\u76f4\u63a5\u6284\u4f5c\u4e1a\u3002<\/strong><\/p>\n<h2>RAG \u5230\u5e95\u662f\u4ec0\u4e48:\u7528\u4eba\u8bdd\u8bf4\u6e05\u695a<\/h2>\n<h3>\u4f20\u7edf AI \u7684\u75db\u70b9<\/h3>\n<p>\u4f60\u95ee GPT:&#8221;<strong>\u6211\u4eec\u516c\u53f8\u5e74\u5047\u653f\u7b56\u662f\u4ec0\u4e48?<\/strong>&#8220;<\/p>\n<p>GPT \u4f1a\u7f16\u4e00\u4e2a\u7b54\u6848,\u56e0\u4e3a\u5b83\u4e0d\u77e5\u9053\u4f60\u516c\u53f8\u7684 HR \u624b\u518c\u3002<\/p>\n<h3>RAG \u600e\u4e48\u89e3\u51b3<\/h3>\n<p><strong>\u5148\u67e5 \u2192 \u518d\u7b54<\/strong>:<\/p>\n<p>1. \u4f60\u95ee\u95ee\u9898:&#8221;\u5e74\u5047\u653f\u7b56\u662f\u4ec0\u4e48&#8221;<\/p>\n<p>2. AI \u53bb\u4f60\u516c\u53f8\u6587\u6863\u5e93\u641c(&#8220;HR \u624b\u518c.pdf&#8221;)<\/p>\n<p>3. \u627e\u5230\u76f8\u5173\u6bb5\u843d<\/p>\n<p>4. \u628a\u6bb5\u843d + \u4f60\u7684\u95ee\u9898 <strong>\u4e00\u8d77\u7ed9\u5927\u6a21\u578b<\/strong><\/p>\n<p>5. \u5927\u6a21\u578b\u57fa\u4e8e\u771f\u5b9e\u8d44\u6599\u751f\u6210\u7b54\u6848<\/p>\n<p><strong>\u7ed3\u679c<\/strong>:\u7b54\u6848 <strong>100% \u57fa\u4e8e\u516c\u53f8\u8d44\u6599<\/strong>,\u4e0d\u4f1a\u778e\u7f16\u3002<\/p>\n<h3>RAG vs \u5fae\u8c03:\u4ec0\u4e48\u65f6\u5019\u7528\u54ea\u4e2a<\/h3>\n<p>| \u7ef4\u5ea6 | RAG | \u5fae\u8c03 |<\/p>\n<p>|&#8212;|&#8212;|&#8212;|<\/p>\n<p>| \u6210\u672c | <strong>\u4f4e<\/strong>(\u51e0\u5c0f\u65f6\u641e\u5b9a) | \u9ad8(\u51e0\u5468 + GPU \u96c6\u7fa4) |<\/p>\n<p>| \u6570\u636e\u91cf | 10-10000 \u6587\u6863 | 1000+ \u6807\u6ce8\u6837\u672c |<\/p>\n<p>| \u5b9e\u65f6\u66f4\u65b0 | \u2705 \u52a0\u6587\u6863\u5373\u53ef | \u274c \u91cd\u65b0\u8bad\u7ec3 |<\/p>\n<p>| \u9002\u5408 | <strong>\u4f01\u4e1a\u77e5\u8bc6\u5e93\/\u5ba2\u670d\/\u6cd5\u89c4<\/strong> | \u98ce\u683c\/\u53e3\u543b\/\u7279\u5b9a\u4efb\u52a1 |<\/p>\n<p>| \u96be\u5ea6 | \u5165\u95e8 | \u9ad8\u7ea7 |<\/p>\n<p><strong>\u7ed3\u8bba<\/strong>:<strong>90% \u4f01\u4e1a\u573a\u666f\u7528 RAG \u5c31\u591f\u4e86<\/strong>\u3002\u53ea\u6709\u9700\u8981&#8221;AI \u5b66\u67d0\u79cd\u7279\u5b9a\u98ce\u683c&#8221;\u624d\u7528\u5fae\u8c03\u3002<\/p>\n<h2>Day 1:\u6587\u6863\u5904\u7406(\u4e0a\u4f20\/\u5206\u6bb5\/\u5411\u91cf\u5316)<\/h2>\n<h3>\u6280\u672f\u6808\u9009\u578b<\/h3>\n<p>| \u6a21\u5757 | \u63a8\u8350\u5de5\u5177 | \u66ff\u4ee3\u65b9\u6848 |<\/p>\n<p>|&#8212;|&#8212;|&#8212;|<\/p>\n<p>| \u5927\u6a21\u578b | <strong>DeepSeek R2<\/strong>(\u4fbf\u5b9c) | \u901a\u4e49\u5343\u95ee \/ Claude \/ GPT-4o |<\/p>\n<p>| Embedding | <strong>BGE-M3<\/strong>(\u4e2d\u6587\u6700\u5f3a) | OpenAI text-embedding-3 |<\/p>\n<p>| \u5411\u91cf\u6570\u636e\u5e93 | <strong>Milvus \/ Qdrant<\/strong> | Chroma \/ Weaviate \/ pgvector |<\/p>\n<p>| \u6587\u6863\u89e3\u6790 | <strong>MinerU<\/strong>(\u56fd\u4ea7) | Unstructured \/ PyMuPDF |<\/p>\n<p>| \u5206\u6bb5 | <strong>LangChain<\/strong> | LlamaIndex \/ \u81ea\u5b9a\u4e49 |<\/p>\n<p>| Web \u6846\u67b6 | <strong>FastAPI<\/strong> | Flask \/ Django |<\/p>\n<p>| \u524d\u7aef | <strong>Next.js + shadcn\/ui<\/strong> | Streamlit \/ Gradio |<\/p>\n<p><strong>\u4e3a\u4ec0\u4e48\u9009\u8fd9\u5957<\/strong>:<\/p>\n<ul>\n<li><strong>DeepSeek R2<\/strong>:0.5 \u5143\/1M tokens(\u4fbf\u5b9c 30 \u500d)<\/li>\n<li><strong>BGE-M3<\/strong>:\u4e2d\u6587 embedding \u4e4b\u738b<\/li>\n<li><strong>Milvus<\/strong>:\u56fd\u4ea7\u5411\u91cf\u6570\u636e\u5e93,\u4e2d\u6587\u6587\u6863\u5168<\/li>\n<li><strong>MinerU<\/strong>:\u56fd\u4ea7 PDF \u89e3\u6790,\u4e2d\u6587\u53cb\u597d<\/li>\n<\/ul>\n<h3>Step 1:\u73af\u5883\u51c6\u5907<\/h3>\n<pre><code>mkdir company-kb-qa\ncd company-kb-qa\npython -m venv venv\nsource venv\/bin\/activate  # Windows: venv\\Scripts\\activate\n\npip install fastapi uvicorn langchain langchain-community \\\n  langchain-deepseek dashscope sentence-transformers \\\n  pymilvus python-multipart aiofiles\n<\/code><\/pre>\n<h3>Step 2:\u6587\u6863\u89e3\u6790(\u652f\u6301 PDF\/Word\/Excel\/Markdown)<\/h3>\n<pre><code># document_parser.py\nimport os\nfrom pathlib import Path\nfrom langchain_community.document_loaders import (\n    PyPDFLoader, UnstructuredWordDocumentLoader,\n    UnstructuredExcelLoader, UnstructuredMarkdownLoader\n)\n\ndef parse_document(filepath: str):\n    \"\"\"\u6839\u636e\u6587\u4ef6\u7c7b\u578b\u89e3\u6790\u6587\u6863\"\"\"\n    ext = Path(filepath).suffix.lower()\n    \n    if ext == '.pdf':\n        loader = PyPDFLoader(filepath)\n    elif ext in ['.docx', '.doc']:\n        loader = UnstructuredWordDocumentLoader(filepath)\n    elif ext in ['.xlsx', '.xls']:\n        loader = UnstructuredExcelLoader(filepath)\n    elif ext == '.md':\n        loader = UnstructuredMarkdownLoader(filepath)\n    else:\n        raise ValueError(f\"\u4e0d\u652f\u6301\u7684\u6587\u4ef6\u7c7b\u578b: {ext}\")\n    \n    docs = loader.load()\n    print(f\"\u2705 \u89e3\u6790 {filepath}: {len(docs)} \u9875\")\n    return docs\n\n# \u6d4b\u8bd5\nif __name__ == \"__main__\":\n    docs = parse_document(\"test_docs\/HR\u624b\u518c.pdf\")\n    print(f\"\u7b2c\u4e00\u9875\u5185\u5bb9:\\n{docs[0].page_content[:200]}\")\n<\/code><\/pre>\n<h3>Step 3:\u667a\u80fd\u5206\u6bb5(\u5173\u952e!)<\/h3>\n<p><strong>\u5206\u6bb5\u7684\u597d\u574f\u76f4\u63a5\u51b3\u5b9a RAG \u6548\u679c<\/strong>\u3002\u4e00\u6bb5\u592a\u957f(\u8d85\u8fc7 2000 \u5b57)AI \u6293\u4e0d\u4f4f\u91cd\u70b9,\u592a\u77ed(50 \u5b57)\u53c8\u7f3a\u4e0a\u4e0b\u6587\u3002<\/p>\n<pre><code># text_splitter.py\nfrom langchain.text_splitter import RecursiveCharacterTextSplitter\n\ndef smart_split(docs, chunk_size=500, chunk_overlap=50):\n    \"\"\"\n    \u667a\u80fd\u5206\u6bb5:\n    - chunk_size=500:\u6bcf\u6bb5 500 \u5b57\u5de6\u53f3\n    - chunk_overlap=50:\u6bb5\u4e4b\u95f4\u91cd\u53e0 50 \u5b57(\u907f\u514d\u5207\u65ad\u8bed\u4e49)\n    \"\"\"\n    splitter = RecursiveCharacterTextSplitter(\n        chunk_size=chunk_size,\n        chunk_overlap=chunk_overlap,\n        separators=[\"\\n\\n\", \"\\n\", \"\u3002\", \"\uff01\", \"\uff1f\", \".\", \"!\", \"?\", \" \", \"\"],\n        length_function=len,\n    )\n    \n    chunks = splitter.split_documents(docs)\n    print(f\"\u2705 \u5206\u6bb5\u5b8c\u6210: {len(docs)} \u9875 \u2192 {len(chunks)} \u6bb5\")\n    return chunks\n\n# \u6d4b\u8bd5\nchunks = smart_split(docs)\nprint(f\"\u7b2c\u4e00\u6bb5:\\n{chunks[0].page_content}\\n---\")\nprint(f\"\u7b2c\u4e00\u6bb5\u6765\u6e90: {chunks[0].metadata}\")\n<\/code><\/pre>\n<p><strong>\u5206\u6bb5\u6280\u5de7<\/strong>:<\/p>\n<ul>\n<li>\u4e2d\u6587\u6587\u6863\u7528 <strong>&#8220;\\n\\n \/ \\n \/ \u3002&#8221;<\/strong> \u5206\u9694\u7b26(\u4f18\u4e8e\u7eaf\u7a7a\u683c)<\/li>\n<li>\u8868\u683c\/\u5217\u8868\u7279\u6b8a\u5904\u7406(\u7528 Unstructured \u7684 <code>strategy=\"fast\"<\/code> \u6a21\u5f0f)<\/li>\n<li>chunk_size = 500-1000 \u5b57(\u6839\u636e\u6587\u6863\u8c03\u6574)<\/li>\n<li>overlap = 10% chunk_size<\/li>\n<\/ul>\n<h3>Step 4:\u5411\u91cf\u5316(Embedding)<\/h3>\n<pre><code># embedder.py\nfrom sentence_transformers import SentenceTransformer\nimport numpy as np\n\nclass Embedder:\n    def __init__(self, model_name=\"BAAI\/bge-m3\"):\n        \"\"\"\u4f7f\u7528 BGE-M3(\u4e2d\u6587 embedding \u738b\u8005)\"\"\"\n        print(f\"\u52a0\u8f7d\u6a21\u578b: {model_name}\")\n        self.model = SentenceTransformer(model_name)\n        # \u9996\u6b21\u8fd0\u884c\u4f1a\u81ea\u52a8\u4e0b\u8f7d\u7ea6 2GB \u6a21\u578b\n    \n    def embed_texts(self, texts: list[str]) -> list[list[float]]:\n        \"\"\"\u6279\u91cf\u5411\u91cf\u5316\"\"\"\n        embeddings = self.model.encode(\n            texts,\n            batch_size=32,\n            normalize_embeddings=True,  # \u5f52\u4e00\u5316,\u65b9\u4fbf\u4f59\u5f26\u76f8\u4f3c\u5ea6\n            show_progress_bar=True\n        )\n        return embeddings.tolist()\n    \n    def embed_query(self, query: str) -> list[float]:\n        \"\"\"\u5411\u91cf\u5316\u5355\u4e2a\u67e5\u8be2\"\"\"\n        return self.model.encode(\n            query,\n            normalize_embeddings=True\n        ).tolist()\n\n# \u5355\u4f8b\n_embedder = None\ndef get_embedder():\n    global _embedder\n    if _embedder is None:\n        _embedder = Embedder()\n    return _embedder\n\n# \u6d4b\u8bd5\nif __name__ == \"__main__\":\n    emb = get_embedder()\n    vectors = emb.embed_texts([\"\u5e74\u5047\u600e\u4e48\u8bf7\", \"\u8bf7\u5047\u6d41\u7a0b\"])\n    print(f\"\u2705 \u5411\u91cf\u5316\u5b8c\u6210: 2 \u4e2a\u6587\u672c \u2192 1024 \u7ef4\u5411\u91cf\")\n    print(f\"\u7b2c\u4e00\u6bb5\u5411\u91cf\u524d 5 \u7ef4: {vectors[0][:5]}\")\n<\/code><\/pre>\n<h3>Step 5:\u5b58\u5165\u5411\u91cf\u6570\u636e\u5e93<\/h3>\n<pre><code># vector_store.py\nfrom pymilvus import MilvusClient, DataType\nimport uuid\n\nclass VectorStore:\n    def __init__(self, db_path=\".\/milvus.db\", collection_name=\"company_kb\"):\n        self.client = MilvusClient(db_path)\n        self.collection = collection_name\n        self._init_collection()\n    \n    def _init_collection(self):\n        \"\"\"\u521d\u59cb\u5316\u96c6\u5408(\u5982\u679c\u4e0d\u5b58\u5728)\"\"\"\n        if self.client.has_collection(self.collection):\n            return\n        \n        schema = self.client.create_schema(\n            auto_id=False,\n            enable_dynamic_field=True\n        )\n        schema.add_field(\"id\", DataType.VARCHAR, max_length=64, is_primary=True)\n        schema.add_field(\"vector\", DataType.FLOAT_VECTOR, dim=1024)\n        schema.add_field(\"text\", DataType.VARCHAR, max_length=8000)\n        schema.add_field(\"source\", DataType.VARCHAR, max_length=512)\n        \n        index_params = self.client.prepare_index_params()\n        index_params.add_index(\n            field_name=\"vector\",\n            index_type=\"IVF_FLAT\",\n            metric_type=\"COSINE\",\n            params={\"nlist\": 128}\n        )\n        \n        self.client.create_collection(\n            collection_name=self.collection,\n            schema=schema,\n            index_params=index_params\n        )\n        print(f\"\u2705 \u521b\u5efa\u96c6\u5408: {self.collection}\")\n    \n    def add_chunks(self, chunks, embeddings):\n        \"\"\"\u6dfb\u52a0\u6587\u6863\u6bb5\u5230\u5411\u91cf\u5e93\"\"\"\n        data = []\n        for chunk, vector in zip(chunks, embeddings):\n            data.append({\n                \"id\": str(uuid.uuid4()),\n                \"vector\": vector,\n                \"text\": chunk.page_content,\n                \"source\": chunk.metadata.get(\"source\", \"unknown\")\n            })\n        \n        self.client.insert(collection_name=self.collection, data=data)\n        print(f\"\u2705 \u63d2\u5165 {len(data)} \u6bb5\u5230\u5411\u91cf\u5e93\")\n    \n    def search(self, query_vector, top_k=5):\n        \"\"\"\u68c0\u7d22\u6700\u76f8\u4f3c\u7684 top_k \u6bb5\"\"\"\n        results = self.client.search(\n            collection_name=self.collection,\n            data=[query_vector],\n            limit=top_k,\n            output_fields=[\"text\", \"source\"]\n        )\n        return results[0]  # \u7b2c\u4e00\u4e2a\u67e5\u8be2\u7684\u7ed3\u679c\n\n# \u5355\u4f8b\n_vs = None\ndef get_vector_store():\n    global _vs\n    if _vs is None:\n        _vs = VectorStore()\n    return _vs\n<\/code><\/pre>\n<h3>Day 1 \u6d4b\u8bd5<\/h3>\n<pre><code># test_day1.py\nfrom document_parser import parse_document\nfrom text_splitter import smart_split\nfrom embedder import get_embedder\nfrom vector_store import get_vector_store\n\n# 1. \u89e3\u6790\ndocs = parse_document(\"test_docs\/HR\u624b\u518c.pdf\")\nchunks = smart_split(docs)\n\n# 2. \u5411\u91cf\u5316\nembedder = get_embedder()\ntexts = [c.page_content for c in chunks]\nvectors = embedder.embed_texts(texts)\n\n# 3. \u5165\u5e93\nvs = get_vector_store()\nvs.add_chunks(chunks, vectors)\n\nprint(\"\ud83c\udf89 Day 1 \u5b8c\u6210!\u6587\u6863\u5df2\u5165\u5e93\")\n<\/code><\/pre>\n<h2>Day 2:\u667a\u80fd\u95ee\u7b54(\u68c0\u7d22 + \u751f\u6210)<\/h2>\n<h3>Step 6:\u95ee\u7b54 Prompt \u6a21\u677f<\/h3>\n<pre><code># prompt_template.py\n\nQA_PROMPT = \"\"\"\u4f60\u662f\u4e00\u4e2a\u4e13\u4e1a\u7684\u4f01\u4e1a\u77e5\u8bc6\u5e93\u52a9\u624b\u3002\u8bf7\u57fa\u4e8e\u4ee5\u4e0b\u53c2\u8003\u8d44\u6599\u56de\u7b54\u7528\u6237\u95ee\u9898\u3002\n\n\u3010\u4e25\u683c\u8981\u6c42\u3011\n1. \u7b54\u6848\u5fc5\u987b 100% \u57fa\u4e8e\u53c2\u8003\u8d44\u6599,\u4e0d\u5141\u8bb8\u7f16\u9020\u4efb\u4f55\u4fe1\u606f\n2. \u5982\u679c\u53c2\u8003\u8d44\u6599\u91cc\u6ca1\u6709\u7b54\u6848,\u76f4\u63a5\u8bf4\"\u62b1\u6b49,\u6587\u6863\u91cc\u6ca1\u6709\u76f8\u5173\u4fe1\u606f\"\n3. \u56de\u7b54\u65f6\u5f15\u7528\u5177\u4f53\u6765\u6e90(\u6587\u4ef6\u540d + \u6bb5\u843d)\n4. \u56de\u7b54\u7b80\u6d01\u6e05\u6670,\u4e0d\u8981\u5e9f\u8bdd\n\n\u3010\u53c2\u8003\u8d44\u6599\u3011\n{context}\n\n\u3010\u7528\u6237\u95ee\u9898\u3011\n{question}\n\n\u3010\u56de\u7b54\u683c\u5f0f\u3011\n\u7b54\u6848: [\u4f60\u7684\u56de\u7b54]\n\u6765\u6e90: [\u5f15\u7528\u4e86\u54ea\u4e9b\u6587\u6863,\u5177\u4f53\u54ea\u6bb5]\n\"\"\"\n\nCONTEXT_TEMPLATE = \"\"\"\u6587\u6863 {index}:\n---\n\u6765\u6e90:{source}\n\u5185\u5bb9:{text}\n---\"\"\"\n<\/code><\/pre>\n<h3>Step 7:\u95ee\u7b54\u4e3b\u903b\u8f91<\/h3>\n<pre><code># qa_engine.py\nfrom langchain_deepseek import ChatDeepSeek\nfrom langchain_core.messages import HumanMessage\nfrom prompt_template import QA_PROMPT, CONTEXT_TEMPLATE\nfrom embedder import get_embedder\nfrom vector_store import get_vector_store\n\nclass QAEngine:\n    def __init__(self):\n        self.embedder = get_embedder()\n        self.vs = get_vector_store()\n        self.llm = ChatDeepSeek(\n            model=\"deepseek-reasoner-r2\",\n            temperature=0.1,  # \u4f4e\u6e29\u5ea6,\u907f\u514d\u7f16\u9020\n            max_tokens=2000\n        )\n    \n    def ask(self, question: str, top_k: int = 5):\n        \"\"\"\u95ee\u7b54\u4e3b\u6d41\u7a0b\"\"\"\n        # 1. \u5411\u91cf\u5316\u95ee\u9898\n        q_vector = self.embedder.embed_query(question)\n        \n        # 2. \u68c0\u7d22 top_k \u76f8\u5173\u6bb5\u843d\n        results = self.vs.search(q_vector, top_k=top_k)\n        \n        if not results:\n            return {\n                \"answer\": \"\u62b1\u6b49,\u77e5\u8bc6\u5e93\u91cc\u6ca1\u6709\u76f8\u5173\u4fe1\u606f\u3002\",\n                \"sources\": []\n            }\n        \n        # 3. \u62fc\u88c5 prompt\n        context_parts = []\n        sources = []\n        for i, hit in enumerate(results, 1):\n            entity = hit[\"entity\"]\n            context_parts.append(CONTEXT_TEMPLATE.format(\n                index=i,\n                source=entity[\"source\"],\n                text=entity[\"text\"][:1000]  # \u622a\u65ad,\u907f\u514d\u8d85\u957f\n            ))\n            sources.append({\n                \"source\": entity[\"source\"],\n                \"score\": hit[\"distance\"],\n                \"text\": entity[\"text\"][:200]\n            })\n        \n        context = \"\\n\\n\".join(context_parts)\n        prompt = QA_PROMPT.format(context=context, question=question)\n        \n        # 4. \u8c03\u7528\u5927\u6a21\u578b\n        response = self.llm.invoke([HumanMessage(content=prompt)])\n        \n        return {\n            \"answer\": response.content,\n            \"sources\": sources\n        }\n\n# \u5355\u4f8b\n_qa = None\ndef get_qa_engine():\n    global _qa\n    if _qa is None:\n        _qa = QAEngine()\n    return _qa\n<\/code><\/pre>\n<h3>Step 8:\u6d4b\u8bd5\u95ee\u7b54<\/h3>\n<pre><code># test_day2.py\nfrom qa_engine import get_qa_engine\n\nqa = get_qa_engine()\n\n# \u6d4b\u8bd5 1\nresult = qa.ask(\"\u5e74\u5047\u600e\u4e48\u8bf7?\u9700\u8981\u63d0\u524d\u51e0\u5929\u7533\u8bf7?\")\nprint(\"=\" * 50)\nprint(f\"\u95ee\u9898:\u5e74\u5047\u600e\u4e48\u8bf7?\u9700\u8981\u63d0\u524d\u51e0\u5929\u7533\u8bf7?\")\nprint(f\"\\n\u7b54\u6848:\\n{result['answer']}\")\nprint(f\"\\n\u6765\u6e90({len(result['sources'])} \u6761):\")\nfor s in result['sources']:\n    print(f\"  - {s['source']} (\u76f8\u4f3c\u5ea6:{s['score']:.3f})\")\n\n# \u6d4b\u8bd5 2\nresult = qa.ask(\"\u516c\u53f8\u5e74\u5047\u662f\u51e0\u5929?\")\nprint(\"=\" * 50)\nprint(f\"\u95ee\u9898:\u516c\u53f8\u5e74\u5047\u662f\u51e0\u5929?\")\nprint(f\"\\n\u7b54\u6848:\\n{result['answer']}\")\n<\/code><\/pre>\n<p><strong>\u9884\u671f\u8f93\u51fa<\/strong>:<\/p>\n<pre><code>\u95ee\u9898:\u5e74\u5047\u600e\u4e48\u8bf7?\u9700\u8981\u63d0\u524d\u51e0\u5929\u7533\u8bf7?\n\n\u7b54\u6848:\u6839\u636e HR \u624b\u518c\u89c4\u5b9a,\u5458\u5de5\u8bf7\u5e74\u5047\u9700\u63d0\u524d 3 \u4e2a\u5de5\u4f5c\u65e5\u5728 OA \u7cfb\u7edf\u63d0\u4ea4\u7533\u8bf7,\n\u5355\u6b21\u5e74\u5047\u4e0d\u8d85\u8fc7 15 \u5929\u3002\u8fde\u7eed\u5e74\u5047\u8d85\u8fc7 5 \u5929\u9700\u90e8\u95e8\u8d1f\u8d23\u4eba\u5ba1\u6279\u3002\n\n\u6765\u6e90(3 \u6761):\n  - HR\u624b\u518c.pdf (\u76f8\u4f3c\u5ea6:0.892)\n  - OA\u7cfb\u7edf\u4f7f\u7528\u6307\u5357.pdf (\u76f8\u4f3c\u5ea6:0.745)\n  - \u5047\u671f\u7ba1\u7406\u5236\u5ea6.pdf (\u76f8\u4f3c\u5ea6:0.621)\n<\/code><\/pre>\n<h2>Day 3:\u90e8\u7f72\u4e0a\u7ebf(API + Web UI)<\/h2>\n<h3>Step 9:FastAPI \u540e\u7aef<\/h3>\n<pre><code># main.py\nfrom fastapi import FastAPI, UploadFile, File, HTTPException\nfrom fastapi.middleware.cors import CORSMiddleware\nfrom pydantic import BaseModel\nfrom typing import List\nimport shutil\nimport os\n\nfrom document_parser import parse_document\nfrom text_splitter import smart_split\nfrom embedder import get_embedder\nfrom vector_store import get_vector_store\nfrom qa_engine import get_qa_engine\n\napp = FastAPI(title=\"\u4f01\u4e1a\u77e5\u8bc6\u5e93\u95ee\u7b54\u7cfb\u7edf\", version=\"1.0\")\n\n# \u8de8\u57df\napp.add_middleware(\n    CORSMiddleware,\n    allow_origins=[\"*\"],\n    allow_methods=[\"*\"],\n    allow_headers=[\"*\"],\n)\n\nUPLOAD_DIR = \".\/uploads\"\nos.makedirs(UPLOAD_DIR, exist_ok=True)\n\n# \u6570\u636e\u6a21\u578b\nclass QuestionRequest(BaseModel):\n    question: str\n    top_k: int = 5\n\nclass QuestionResponse(BaseModel):\n    question: str\n    answer: str\n    sources: List[dict]\n\n# API:\u4e0a\u4f20\u6587\u6863\n@app.post(\"\/upload\")\nasync def upload_document(file: UploadFile = File(...)):\n    \"\"\"\u4e0a\u4f20\u5e76\u5904\u7406\u6587\u6863\"\"\"\n    # \u4fdd\u5b58\u6587\u4ef6\n    file_path = os.path.join(UPLOAD_DIR, file.filename)\n    with open(file_path, \"wb\") as f:\n        shutil.copyfileobj(file.file, f)\n    \n    try:\n        # \u5904\u7406\u6d41\u7a0b\n        docs = parse_document(file_path)\n        chunks = smart_split(docs)\n        \n        embedder = get_embedder()\n        vectors = embedder.embed_texts([c.page_content for c in chunks])\n        \n        vs = get_vector_store()\n        vs.add_chunks(chunks, vectors)\n        \n        return {\n            \"filename\": file.filename,\n            \"pages\": len(docs),\n            \"chunks\": len(chunks),\n            \"status\": \"success\"\n        }\n    except Exception as e:\n        raise HTTPException(500, f\"\u5904\u7406\u5931\u8d25: {str(e)}\")\n\n# API:\u95ee\u7b54\n@app.post(\"\/ask\", response_model=QuestionResponse)\nasync def ask_question(req: QuestionRequest):\n    \"\"\"\u667a\u80fd\u95ee\u7b54\"\"\"\n    qa = get_qa_engine()\n    result = qa.ask(req.question, top_k=req.top_k)\n    return QuestionResponse(\n        question=req.question,\n        answer=result[\"answer\"],\n        sources=result[\"sources\"]\n    )\n\n# \u5065\u5eb7\u68c0\u67e5\n@app.get(\"\/health\")\nasync def health():\n    return {\"status\": \"ok\"}\n\n# \u542f\u52a8: uvicorn main:app --host 0.0.0.0 --port 8000 --reload\n<\/code><\/pre>\n<h3>Step 10:Next.js \u524d\u7aef(\u7b80\u5316\u7248)<\/h3>\n<pre><code>\/\/ app\/page.tsx\n'use client';\nimport { useState } from 'react';\n\nexport default function Home() {\n  const [question, setQuestion] = useState('');\n  const [answer, setAnswer] = useState('');\n  const [sources, setSources] = useState<any[]>([]);\n  const [loading, setLoading] = useState(false);\n\n  const ask = async () => {\n    if (!question.trim()) return;\n    setLoading(true);\n    const res = await fetch('http:\/\/localhost:8000\/ask', {\n      method: 'POST',\n      headers: { 'Content-Type': 'application\/json' },\n      body: JSON.stringify({ question, top_k: 5 })\n    });\n    const data = await res.json();\n    setAnswer(data.answer);\n    setSources(data.sources);\n    setLoading(false);\n  };\n\n  return (\n    <main className=\"min-h-screen bg-gradient-to-br from-blue-50 to-purple-50 p-8\">\n      <div className=\"max-w-3xl mx-auto\">\n        <h1 className=\"text-4xl font-bold mb-8\">\ud83d\udcda \u4f01\u4e1a\u77e5\u8bc6\u5e93<\/h1>\n        \n        <div className=\"bg-white rounded-2xl shadow-lg p-6 mb-6\">\n          <textarea\n            className=\"w-full p-4 border rounded-lg\"\n            rows={3}\n            placeholder=\"\u95ee\u6211\u4efb\u4f55\u5173\u4e8e\u516c\u53f8\u7684\u95ee\u9898...\"\n            value={question}\n            onChange={(e) => setQuestion(e.target.value)}\n          \/>\n          <button\n            onClick={ask}\n            disabled={loading}\n            className=\"mt-4 px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700\"\n          >\n            {loading ? '\u601d\u8003\u4e2d...' : '\u63d0\u95ee'}\n          <\/button>\n        <\/div>\n\n        {answer && (\n          <div className=\"bg-white rounded-2xl shadow-lg p-6\">\n            <h2 className=\"text-xl font-semibold mb-3\">\ud83d\udca1 \u7b54\u6848<\/h2>\n            <p className=\"whitespace-pre-wrap text-gray-800\">{answer}<\/p>\n            \n            {sources.length > 0 && (\n              <div className=\"mt-6 pt-6 border-t\">\n                <h3 className=\"text-sm font-semibold mb-2 text-gray-600\">\n                  \ud83d\udcce \u53c2\u8003\u6765\u6e90\n                <\/h3>\n                {sources.map((s, i) => (\n                  <div key={i} className=\"text-xs text-gray-500 mb-2 p-2 bg-gray-50 rounded\">\n                    <div className=\"font-semibold\">{s.source}<\/div>\n                    <div className=\"text-gray-400\">\u76f8\u4f3c\u5ea6: {s.score.toFixed(3)}<\/div>\n                  <\/div>\n                ))}\n              <\/div>\n            )}\n          <\/div>\n        )}\n      <\/div>\n    <\/main>\n  );\n}\n<\/code><\/pre>\n<h3>Step 11:\u542f\u52a8\u670d\u52a1<\/h3>\n<pre><code># \u7ec8\u7aef 1:\u542f\u52a8\u540e\u7aef\ncd company-kb-qa\nsource venv\/bin\/activate\nuvicorn main:app --host 0.0.0.0 --port 8000 --reload\n\n# \u7ec8\u7aef 2:\u542f\u52a8\u524d\u7aef\nnpx create-next-app@latest frontend\ncd frontend\n# \u590d\u5236\u4e0a\u9762\u7684 page.tsx\nnpm run dev\n\n# \u8bbf\u95ee http:\/\/localhost:3000\n<\/code><\/pre>\n<h2>\u8fdb\u9636\u4f18\u5316(\u8ba9\u7cfb\u7edf\u66f4\u5f3a)<\/h2>\n<h3>1. \u6df7\u5408\u68c0\u7d22(\u5173\u952e\u8bcd + \u5411\u91cf)<\/h3>\n<pre><code># \u5173\u952e\u8bcd\u68c0\u7d22(BM25)+ \u5411\u91cf\u68c0\u7d22 \u2192 \u878d\u5408\u6392\u5e8f\nfrom rank_bm25 import BM25Okapi\n\ndef hybrid_search(question, top_k=5):\n    # \u5411\u91cf\u68c0\u7d22\n    q_vec = embedder.embed_query(question)\n    vector_results = vs.search(q_vec, top_k=top_k*2)\n    \n    # BM25 \u68c0\u7d22\n    tokenized_corpus = [c.page_content.split() for c in all_chunks]\n    bm25 = BM25Okapi(tokenized_corpus)\n    bm25_scores = bm25.get_scores(question.split())\n    top_bm25_idx = np.argsort(bm25_scores)[-top_k*2:][::-1]\n    \n    # \u878d\u5408\u6392\u5e8f(RRF)\n    ...\n<\/code><\/pre>\n<h3>2. \u91cd\u6392\u5e8f(Re-rank)<\/h3>\n<pre><code># \u7528 bge-reranker-v2-m3 \u91cd\u6392,\u51c6\u786e\u7387 +20%\nfrom sentence_transformers import CrossEncoder\n\nreranker = CrossEncoder('BAAI\/bge-reranker-v2-m3')\nscores = reranker.predict([(question, chunk.text) for chunk in candidates])\n<\/code><\/pre>\n<h3>3. Query \u6539\u5199<\/h3>\n<pre><code># \u628a\"\u5e74\u5047\u51e0\u5929\"\u6539\u6210\"\u5e74\u5047\u5929\u6570\u89c4\u5b9a\"\ndef rewrite_query(question):\n    prompt = f\"\u628a\u7528\u6237\u95ee\u9898\u6539\u5199\u5f97\u66f4\u5b8c\u6574\u3001\u66f4\u9002\u5408\u68c0\u7d22\u3002\u539f\u95ee\u9898:{question}\"\n    return llm.invoke(prompt).content\n<\/code><\/pre>\n<h3>4. \u591a\u8f6e\u5bf9\u8bdd(\u4e0a\u4e0b\u6587\u8bb0\u5fc6)<\/h3>\n<pre><code># \u4fdd\u5b58\u5bf9\u8bdd\u5386\u53f2,\u652f\u6301\"\u90a3\u4e2a\u5462?\"\"\u4e0a\u4e00\u4e2a\u95ee\u9898\u91cc\u7684 XX\"\nfrom langchain.memory import ConversationBufferMemory\n\nmemory = ConversationBufferMemory()\n# \u6bcf\u8f6e\u95ee\u7b54\u65f6,\u628a\u5386\u53f2\u5bf9\u8bdd\u4e5f\u4f20\u7ed9 LLM\n<\/code><\/pre>\n<h2>\u6210\u672c\u4f30\u7b97(\u6708\u6d3b 1000 \u4eba\u4f01\u4e1a)<\/h2>\n<p>| \u6a21\u5757 | \u6708\u6210\u672c |<\/p>\n<p>|&#8212;|&#8212;|<\/p>\n<p>| DeepSeek R2 API | \u00a530(1000 \u6b21\u95ee\u7b54) |<\/p>\n<p>| BGE-M3 Embedding(\u81ea\u90e8\u7f72) | \u00a50 |<\/p>\n<p>| Milvus(\u81ea\u90e8\u7f72) | \u00a50 |<\/p>\n<p>| \u670d\u52a1\u5668(2 \u6838 4G) | \u00a5100 |<\/p>\n<p>| <strong>\u603b\u8ba1<\/strong> | <strong>\u00a5130\/\u6708<\/strong> |<\/p>\n<p><strong>\u5bf9\u6bd4<\/strong>:\u5546\u4e1a RAG \u4ea7\u54c1(Coze\/\u6263\u5b50\u4f01\u4e1a\u7248)\u6708\u8d39 \u00a51000-5000,<strong>\u81ea\u5efa\u4fbf\u5b9c 10 \u500d<\/strong>\u3002<\/p>\n<h2>\u5e38\u89c1\u5751(\u907f\u96f7\u6307\u5357)<\/h2>\n<h3>\u5751 1:\u5206\u6bb5\u5207\u9519\u4f4d\u7f6e<\/h3>\n<p><strong>\u75c7\u72b6<\/strong>:AI \u56de\u7b54\u725b\u5934\u4e0d\u5bf9\u9a6c\u5634<\/p>\n<p><strong>\u539f\u56e0<\/strong>:\u5206\u6bb5\u843d\u6b63\u597d\u628a&#8221;\u4e0a\u4e0b\u6587&#8221;\u5207\u65ad\u4e86<\/p>\n<p><strong>\u89e3\u51b3<\/strong>:\u8c03\u5927 chunk_overlap(50\u2192100),\u6216\u7528\u8bed\u4e49\u5206\u6bb5<\/p>\n<h3>\u5751 2:PDF \u626b\u63cf\u4ef6\u89e3\u6790\u5931\u8d25<\/h3>\n<p><strong>\u75c7\u72b6<\/strong>:PDF \u4e0a\u4f20\u540e\u5185\u5bb9\u662f\u7a7a\u7684<\/p>\n<p><strong>\u539f\u56e0<\/strong>:\u626b\u63cf\u4ef6 PDF \u6ca1\u6709\u6587\u5b57\u5c42<\/p>\n<p><strong>\u89e3\u51b3<\/strong>:\u7528 MinerU \u6216 PaddleOCR \u5148\u505a OCR<\/p>\n<h3>\u5751 3:Embedding \u6a21\u578b\u9009\u9519<\/h3>\n<p><strong>\u75c7\u72b6<\/strong>:\u4e2d\u6587\u68c0\u7d22\u51c6\u786e\u7387\u4f4e<\/p>\n<p><strong>\u539f\u56e0<\/strong>:\u7528\u4e86 OpenAI text-embedding-3(\u82f1\u6587\u4f18\u5316)<\/p>\n<p><strong>\u89e3\u51b3<\/strong>:\u6362 BGE-M3(\u4e2d\u6587)\u6216\u591a\u8bed\u8a00\u7248\u672c<\/p>\n<h3>\u5751 4:\u5927\u6a21\u578b\u8fd8\u662f\u7f16\u9020<\/h3>\n<p><strong>\u75c7\u72b6<\/strong>:AI \u56de\u7b54\u91cc\u6709&#8221;\u6839\u636e\u76f8\u5173\u8d44\u6599\u663e\u793a&#8221;\u4f46\u5b9e\u9645\u6ca1\u5f15\u7528<\/p>\n<p><strong>\u539f\u56e0<\/strong>:Prompt \u6ca1\u5f3a\u8c03&#8221;\u5fc5\u987b\u57fa\u4e8e\u53c2\u8003\u8d44\u6599&#8221;<\/p>\n<p><strong>\u89e3\u51b3<\/strong>:\u52a0\u4e25\u683c Prompt \u7ea6\u675f + \u52a0&#8221;\u5982\u679c\u8d44\u6599\u6ca1\u7b54\u6848\u5c31\u8bf4\u6ca1&#8221;<\/p>\n<h2>\u4e0a\u624b Checklist<\/h2>\n<ul>\n<li>[ ] Day 1: \u6587\u6863\u89e3\u6790 + \u5206\u6bb5 + \u5411\u91cf\u5316 + \u5165\u5e93<\/li>\n<li>[ ] Day 2: \u95ee\u7b54 Prompt + \u68c0\u7d22 + \u751f\u6210<\/li>\n<li>[ ] Day 3: FastAPI + Next.js + \u90e8\u7f72<\/li>\n<li>[ ] \u4e0a\u4f20 5+ \u7bc7\u771f\u5b9e\u6587\u6863\u6d4b\u8bd5<\/li>\n<li>[ ] \u7528 20 \u4e2a\u771f\u5b9e\u95ee\u9898\u6d4b\u8bd5\u51c6\u786e\u7387<\/li>\n<li>[ ] \u4f18\u5316(\u6df7\u5408\u68c0\u7d22 \/ \u91cd\u6392\u5e8f \/ Query \u6539\u5199)<\/li>\n<li>[ ] \u90e8\u7f72\u5230\u4e91\u670d\u52a1\u5668(\u963f\u91cc\u4e91\/\u817e\u8baf\u4e91)<\/li>\n<li>[ ] \u63a5\u5165\u4f01\u4e1a\u5fae\u4fe1\/\u9489\u9489<\/li>\n<\/ul>\n<h2>\u4e00\u53e5\u8bdd\u603b\u7ed3<\/h2>\n<p><strong>RAG \u4e0d\u662f\u9ed1\u79d1\u6280,\u662f 2026 \u5e74\u6bcf\u4e2a\u5f00\u53d1\u8005\u90fd\u5e94\u8be5\u4f1a\u7684\u57fa\u7840\u6280\u80fd<\/strong>\u3002<\/p>\n<p>3 \u5929\u642d\u4e00\u4e2a\u4f01\u4e1a\u77e5\u8bc6\u5e93\u95ee\u7b54\u7cfb\u7edf,\u6708\u6210\u672c \u00a5130,\u6bd4\u5546\u4e1a\u4ea7\u54c1\u4fbf\u5b9c 10 \u500d,\u6548\u679c\u76f8\u5f53\u3002<\/p>\n<ul>\n<li><strong>\u56fd\u4ea7 + \u4fbf\u5b9c<\/strong>:DeepSeek R2 + BGE-M3 + Milvus<\/li>\n<li><strong>\u7b80\u5355<\/strong>:\u8ddf\u7740\u6559\u7a0b\u6284\u5c31\u884c<\/li>\n<li><strong>\u5f3a<\/strong>:\u8986\u76d6 90% \u4f01\u4e1a\u77e5\u8bc6\u5e93\u573a\u666f<\/li>\n<\/ul>\n<p><strong>RAG \u4e0d\u662f&#8221;\u672a\u6765\u6280\u672f&#8221;,\u662f&#8221;\u73b0\u5728\u6280\u80fd&#8221;\u3002<\/strong><\/p>\n<p><strong>\u4f60\u6253\u7b97\u7528 RAG \u642d\u4ec0\u4e48\u7cfb\u7edf?<\/strong> HR\/\u5ba2\u670d\/\u6cd5\u52a1\/\u533b\u7597?\u8bc4\u8bba\u533a\u544a\u8bc9\u6211,\u6211\u5e2e\u4f60\u4f18\u5316\u65b9\u6848\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>RAG \u5165\u95e8\u5230\u5b9e\u6218\u5c01\u9762 RAG \u5165\u95e8\u5230\u5b9e\u6218:3 \u5929\u642d\u4e00\u4e2a\u4f01\u4e1a\u77e5\u8bc6\u5e93\u95ee\u7b54\u7cfb\u7edf(2026 \u5b8c\u6574\u7248) \u5206\u7c7b:AI \u6280 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1055,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[112,50],"class_list":["post-527","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-tech","tag-deepseek","tag-rag-"],"jetpack_featured_media_url":"https:\/\/www.eshowai.com\/wp-content\/uploads\/2026\/07\/21-rag-3-days-enterprise-cover-6.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.eshowai.com\/index.php\/wp-json\/wp\/v2\/posts\/527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.eshowai.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.eshowai.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.eshowai.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.eshowai.com\/index.php\/wp-json\/wp\/v2\/comments?post=527"}],"version-history":[{"count":9,"href":"https:\/\/www.eshowai.com\/index.php\/wp-json\/wp\/v2\/posts\/527\/revisions"}],"predecessor-version":[{"id":1084,"href":"https:\/\/www.eshowai.com\/index.php\/wp-json\/wp\/v2\/posts\/527\/revisions\/1084"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.eshowai.com\/index.php\/wp-json\/wp\/v2\/media\/1055"}],"wp:attachment":[{"href":"https:\/\/www.eshowai.com\/index.php\/wp-json\/wp\/v2\/media?parent=527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.eshowai.com\/index.php\/wp-json\/wp\/v2\/categories?post=527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.eshowai.com\/index.php\/wp-json\/wp\/v2\/tags?post=527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}