Rex (Rules Expert)
Rex (Rules Expert) agent guide - deploy an AI-powered knowledge assistant trained on your company policies, procedures, and compliance documents to answer team questions instantly.
Overview
Section titled “Overview”Rex (Rules Expert) is a company knowledge assistant that reads, understands, and answers questions based solely on your organization’s official documents - Standard Operating Procedures (SOPs), policies, and internal rules provided in PDF or DOCX format.
Purpose: Ensure consistent, reliable, and policy-compliant responses across the company. Rex never invents information. If an answer is not present in the uploaded documents, it explicitly states that.
Key Features
Section titled “Key Features”-
Document-Based Knowledge - Identifies headers, sections, and relevant content areas to provide clear and organized responses.
-
Context-Aware Responses - Gives accurate answers based on the context of the user’s question and the structure of the document.
-
No Hallucinations - If the answer to a question is not found in the documents, the agent explicitly states that, avoiding any made-up responses.
-
Structured Summarization - The Document Summarizer tool agent generates a content summary for each uploaded file, providing the main agent with additional training context beyond raw text retrieval.
Supported File Types
Section titled “Supported File Types”.pdf.docx
How It Works
Section titled “How It Works”-
File Ingestion - The agent accepts PDF or DOCX files and extracts readable text using OCR or native parsing.
-
Structure Recognition - It detects document layout elements such as headings, subheadings, bullet points, and sections.
-
Content Indexing - The extracted content is organized for fast and relevant retrieval and stored in the
sop_summarizertable. -
Question Answering - When a user asks a question, the agent matches it to relevant parts of the indexed content and returns an accurate, policy-based response.
Use Cases
Section titled “Use Cases”- HR and benefits FAQs
- Operations and compliance checks
- IT process guidance
- General company policy inquiries
- Onboarding assistance for new employees
- Audit readiness and policy verification
Prerequisites
Section titled “Prerequisites”Before setting up Rex, confirm the following:
- You have access to the Synthreo Builder environment and the Data Studio’s File Manager.
- The documents to be uploaded are finalized, clearly formatted PDF or DOCX files. Well-structured documents with consistent headings produce the best results.
- You have the ProServ team or tenant admin credentials needed to run the Document Summarizer tool agent.
- The
sop_summarizertable exists within the “Tests DB” database in Synthreo DCS. If it does not exist, contact your administrator to create it before proceeding.
How to Set Up Rex
Section titled “How to Set Up Rex”Step 1: Prepare Your Documents
Section titled “Step 1: Prepare Your Documents”Before uploading, review each document for clarity and consistency:
- Ensure headings and subheadings are clearly formatted. Rex uses these to identify sections and provide organized responses.
- Remove outdated or draft content that should not be indexed.
- Convert scanned-only PDFs to text-based or OCR-processed PDFs so the agent can extract content accurately.
Step 2: Upload External Documents
Section titled “Step 2: Upload External Documents”Upload your policy and SOP documents to the Data Studio’s File Manager.
These are the files Rex will use to train and answer questions. Each file should represent a single policy domain or document type for the clearest results (for example, one file for the IT Security Policy, one file for the HR Benefits Guide).
Step 3: Run the Document Summarizer Tool Agent
Section titled “Step 3: Run the Document Summarizer Tool Agent”The tool agent responsible for processing documents is named:
“(10737) Rex (Rules Expert): Document Summarizer”
Run this agent to:
- Scrape and load each uploaded document into the Data Studio database
- Generate a content summary for each document
- Store both the raw content and summaries in the
sop_summarizertable within the “Tests DB” database
These summaries are used in the main Rex agent as additional training context, improving answer relevance for high-level or cross-document questions.
Step 4: Configure the Conversational Agent
Section titled “Step 4: Configure the Conversational Agent”Open the main Rex (Rules Expert) agent.
- Confirm it is pointed at the
sop_summarizertable as its training data source. - Review and adjust the System Message to reflect the specific document set Rex will handle. For example, if Rex is deployed for IT policy questions only, the system message should scope responses accordingly.
Step 5: Train the Model
Section titled “Step 5: Train the Model”Click the Train Model button to complete the training process. Rex is now ready to answer questions based on the uploaded documents.
Updating Rex with New Documents
Section titled “Updating Rex with New Documents”When new documents are added or existing documents are updated, the full setup process must be repeated:
- Upload the new or revised files to the File Manager.
- Re-run the Document Summarizer tool agent to process and index the new content.
- Re-train the Rex conversational agent by clicking Train Model.
Note: While interval scheduling is available for automated re-processing, it is not recommended for SOPs and policies, as company documents are rarely updated frequently enough to justify continuous re-ingestion. Manual re-runs when documents change are the preferred approach.
Limitations
Section titled “Limitations”- Rex answers only from the uploaded files. It does not use general knowledge or external sources.
- The quality of the output depends on the clarity and organization of the source documents. Poorly formatted or inconsistent documents will produce less accurate responses.
- If document formatting is inconsistent, header and section detection may be less accurate.
- Rex processes one question at a time and returns answers based on the best-matching content. For questions that span multiple documents, it synthesizes across the available indexed content.
Troubleshooting
Section titled “Troubleshooting”Issue: Rex says it cannot find an answer, but the information is in the uploaded document.
Check:
- Confirm the Document Summarizer tool agent was run after the file was uploaded.
- Verify the file was successfully processed and rows were inserted into the
sop_summarizertable. - Check that the document is text-readable. Scanned PDFs without OCR will not extract correctly.
- Confirm the Train Model step was completed after the last document run.
Issue: Rex provides an answer but it references the wrong section or policy.
Check:
- Review the document for ambiguous or duplicate headings that may confuse section detection.
- If multiple documents contain similar policy names, consider renaming sections to be more distinct.
- Adjust the System Message to provide additional context about the document set scope.
Issue: The Document Summarizer tool agent fails during processing.
Check:
- Confirm the file format is
.pdfor.docx. Other formats are not supported. - Verify the file is not password-protected or corrupted.
- Check that the
sop_summarizertable exists and the database connection is active in the Data Studio.
Q: Can Rex handle multiple languages?
A: Rex processes documents in the language they are written in. If your SOPs are in English, Rex will answer in English. Multi-language support depends on the underlying LLM’s language capabilities and the quality of the source documents.
Q: How many documents can Rex handle?
A: There is no strict limit on document count, but a larger document set will increase processing time during the Document Summarizer run and during training. Keep the document set focused on the relevant policy domain for best performance.
Q: Can Rex be used for multiple departments with different document sets?
A: Yes. You can deploy separate Rex instances, each trained on a different document set, for example one for HR, one for IT, and one for Operations. Each instance would have its own System Message scoped to the appropriate domain.
Q: Who is responsible for running the Document Summarizer and re-training Rex?
A: This is handled by the ProServ team or tenant admin. End users interact only with the conversational Rex agent and do not need access to the training pipeline.