AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

How to Build Custom Ernie Bot Agents for Internal Knowledge Retrieval and FAQ Automation

365Finds Editorial
Indexed 11,430 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

Internal documentation and routine operational inquiries consume disproportionate hours across human resources, IT support, sales enablement, and operations teams. While general-purpose AI chat assistants can synthesize public information, they lack context regarding company-specific policies, proprietary product specifications, and standard operating procedures (SOPs). Within the Baidu AI ecosystem, business teams and knowledge workers can solve this challenge without engineering overhead by building custom agent bots on the Ernie Bot AgentBuilder platform (agents.baidu.com).

By combining Baidu's Ernie large language models with a native Retrieval-Augmented Generation (RAG) knowledge engine, AgentBuilder allows non-technical teams to turn static handbooks, policies, and spreadsheets into interactive conversational agents. These bots deliver grounded, cited answers while mitigating hallucination risks.


Core Architecture: How Ernie AgentBuilder Solves Internal Knowledge Retrieval

Traditional keyword-based enterprise search often forces employees to read through dense twenty-page manuals just to find a single reimbursement limit or VPN configuration setting. Standard LLMs, on the other hand, generate plausible but unverified guesses when queried about proprietary information.

Ernie Bot's AgentBuilder bridges this gap through a visual, zero-code pipeline:

  1. Document Ingestion & Chunking: The platform accepts internal documents (PDF, DOCX, TXT, Markdown, PPT) and structured tables (XLSX, CSV). It automatically strips markup, splits text into semantic segments (chunks), and converts them into dense vector embeddings.
  2. Hybrid Semantic Retrieval: When an employee submits a query in natural language, the engine performs hybrid semantic and keyword matching across the vectorized knowledge index to retrieve the most relevant text chunks.
  3. Prompt Grounding: Retrieved context snippets are injected alongside the user query into the underlying Ernie model, accompanied by strict grounding instructions.
  4. Attributed Generation: The agent synthesizes a direct, natural-language response and surfaces citation tags linked to specific source paragraphs, enabling employees to verify policy details immediately.

Step-by-Step Implementation Guide

Setting up an automated FAQ and knowledge retrieval agent on AgentBuilder requires five concrete phases: preparation, creation, knowledge ingestion, prompt orchestration, and debugging.

Step 1: Prepare and Structure Knowledge Assets

The quality of an agent's answers depends directly on how source material is structured. AgentBuilder supports two primary knowledge formats:

Step 2: Create the Agent in AgentBuilder

  1. Navigate to the Ernie AgentBuilder Console (https://agents.baidu.com/) and sign in with your enterprise or authorized Baidu account.
  2. Click Create Agent (创建智能体).
  3. Select the creation mode:
    • Zero-Code / Natural Language Creation: Allows you to describe your intent (e.g., "Build an HR onboarding assistant that answers employee benefits questions based on uploaded documents"), and the system auto-generates the initial persona and settings.
    • Low-Code Visual Configuration (Recommended): Gives granular control over system prompts, knowledge base binding, tool calling, and workflow triggers.
  4. Fill in basic metadata: Agent Name (e.g., OpsDesk Internal Bot), Avatar, and a clear Description summarizing its scope.

Step 3: Configure and Bind Knowledge Bases

  1. In the agent configuration dashboard, locate the Knowledge Base (知识库) module and select Add Knowledge Base.
  2. Click Create New Knowledge Base or attach an existing repository.
  3. Upload your structured FAQ tables and unstructured documents.
  4. Inspect the Chunking Strategy:
    • For standard procedural documents, use the platform's automated semantic chunking.
    • For dense technical guides, adjust chunk lengths and preview chunk boundaries to ensure entire clauses or numbered steps remain intact in a single slice.
  5. Enable Strict Retrieval / Forced Knowledge Call: When building internal policy bots, configure the retrieval threshold so the bot prioritizes uploaded documentation over the general knowledge of the foundation model.

Step 4: Craft the System Prompt and Guardrails

The system prompt defines how the Ernie model interprets queries and treats missing information. Avoid vague instructions. Instead, provide explicit behavioral constraints:

# Role & Purpose
You are OpsDesk, the internal knowledge assistant for our operations team. Your role is to answer employee inquiries accurately using only the attached knowledge base.

# Guidelines
1. Grounded Answers: Base your answers strictly on the retrieved knowledge base segments. Do not extrapolate, assume, or invent details not present in the documents.
2. Citations: Reference the exact section, clause, or policy title whenever presenting factual rules.
3. Fallback Handling: If the user's question cannot be answered using the attached knowledge base, state clearly: "I cannot find this information in the current internal documentation. Please contact the Operations Helpdesk at #ops-support on our internal messenger." Never fabricate company policy.
4. Tone: Professional, direct, concise, and helpful.

Configure Starter Questions (引导问题) and a welcoming Greeting Message (开场白) so team members immediately understand what questions the agent is equipped to answer (e.g., "Ask about travel reimbursement limits", "How to request a software license", "Hardware replacement cycle").

Step 5: Test, Debug, and Verify Citations

Use the real-time preview panel on the right side of the AgentBuilder interface to conduct rigorous verification:

  1. Paraphrase Testing: Enter the same core question using slang, typos, abbreviations, or indirect phrasing to verify that vector semantic retrieval catches the right FAQ pair.
  2. Out-of-Scope Testing: Ask questions completely absent from the documentation (e.g., asking about executive compensation in an IT manual). Ensure the bot executes the fallback disclaimer instead of hallucinating.
  3. Citation Inspection: Click the generated reference markers below the answer to confirm that the text highlighted in the knowledge viewer directly justifies the generated response.
  4. Threshold Tuning: If the agent reports missing information for topics covered in the files, lower the relevance recall threshold slightly or add common synonym queries to the FAQ spreadsheet.

Step 6: Deploy and Distribute Internally

Once verified, click Publish (发布):


AgentBuilder vs. Baidu Qianfan: Selecting the Right Platform

Organizations evaluating Baidu's ecosystem often compare AgentBuilder with the Baidu Intelligent Cloud Qianfan platform (cloud.baidu.com/product/qianfan.html):

Feature DimensionErnie AgentBuilder (agents.baidu.com)Baidu Qianfan Platform (cloud.baidu.com)
Primary AudienceBusiness teams, knowledge workers, HR, operationsSoftware engineers, ML engineers, enterprise architects
Setup ComplexityZero-code / Low-code visual configurationAPI/SDK integration, code-first workflows
Knowledge ManagementDirect file upload, automatic parsing & chunkingVector database integration, custom embedding pipelines
CustomizationSystem prompts, starter questions, built-in toolsModel fine-tuning (SFT, LoRA), custom APIs, VPC hosting
Security & DeploymentHosted cloud agent, link/whitelist sharingPrivate cloud, on-premises deployment, VPC isolation
Ideal Use CaseDepartmental FAQ, employee handbooks, sales enablementMission-critical core software, high-throughput API endpoints

For departmental knowledge retrieval and standard operational FAQs, AgentBuilder delivers immediate turnaround without requiring engineering resources or infrastructure management.


Best Practices for Long-Term Knowledge Maintenance

To keep your Ernie agent accurate and trusted over time, follow three operational practices:

  1. Maintain Single Sources of Truth: When company policy changes, update the existing document in the knowledge base rather than uploading duplicate files with version numbers. Delete superseded documents immediately to prevent retrieval collisions.
  2. Review Unanswered Queries: Regularly review conversation logs in the AgentBuilder analytics tab. Identify recurring user questions that triggered the fallback response and draft new FAQ pairs to fill those knowledge gaps.
  3. Separate Broad Concepts from Precise Rules: Use narrative handbooks for conceptual overviews, but maintain a dedicated Excel FAQ sheet for exact numbers, dates, tier qualifications, and escalation contacts.

Implementing a custom Ernie Bot agent empowers business teams to democratize internal knowledge access, eliminate repetitive manual support inquiries, and ensure corporate policies remain consistently accessible around the clock.


References