=== Truebe - Fact-Based AI Chatbot ===
Contributors: bmohr
Tags: ai chatbot, chatbot, hallucination, compliance, audit trail
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

An AI chatbot that only answers with facts you approve. It reads your documents, builds question-and-answer pairs, and never makes anything up.

== Description ==

Most AI chatbots generate a fresh answer every time someone asks a question. That is where hallucination comes from: the AI invents a plausible-sounding reply that may be wrong. For a business, one made-up answer about pricing, policy, or care can do real damage.

Truebe works differently. You upload a document, Truebe reads it once and drafts question-and-answer pairs, and then you review and approve each answer before it can ever be shown. At question time there is no live AI generating text. A visitor only ever sees an answer a human on your team already approved.

We call this human in the loop, not human after the loop.

**How it works**

1. Connect your AI key (see "What you need" below).
2. Upload a PDF. Truebe reads it and drafts question-and-answer pairs.
3. Review each pair in your Fact Library and approve the ones you want live. Edit any wording you like.
4. Add the chatbot to any page with the `[truebe_chat]` shortcode.

When a visitor asks something, Truebe matches their question to your approved answers and shows the closest one. If nothing matches, it can offer related approved questions instead of a dead end. It never invents an answer.

**Every answer shows its source**

For each answer built from a document, Truebe records exactly where it came from: the file, the section, and the page. You can open the source document straight to the cited page while you review.

**Every approval is logged**

Every answer you approve is timestamped and recorded in an audit log, with who approved it and when. You can export this log any time for compliance review, insurance, or an audit.

**It gets smarter every day**

When a visitor asks something your chatbot cannot answer, Truebe logs the question instead of losing it. Near-identical questions are grouped, so you see "11 people asked something like this" rather than eleven separate lines. Each unanswered question becomes a one-click item on your Unanswered list: answer it once, approve it, and the next visitor who asks gets a real answer. Your chatbot improves as your visitors use it.

**What you need**

Truebe uses your own AI account to read your documents and draft answers. You provide an API key from either OpenAI (ChatGPT) or Anthropic (Claude). The plugin includes a step-by-step guide that walks you through creating an account, adding credits, and copying your key. It takes about five minutes, and the AI provider charges you directly per use (usually pennies).

Your key is used only to read your uploaded documents and draft answers. There is no live AI call when a visitor asks a question.

**Plans and limits**

Every feature of this plugin is free and fully functional with no limits: document processing, answer approval, editing, source citations, the audit log and its export, the unanswered questions list, the chatbot, and all customization. Nothing in the plugin is locked, restricted, or reserved for paying users, and there is no limit on how many documents you can upload.

Truebe.io is an optional account service for future add-on features and support. Connecting it is never required to use any part of this plugin.

**Where your data lives**

Your approved questions and answers are stored in your own WordPress database, on your own server. When you upload a document, it is read once by your chosen AI provider to draft answers, then deleted. Truebe does not keep your documents or your answers.

You are responsible for the content you upload and approve. Please do not upload documents containing private or personal data.

**Customize the chatbot**

Set the header label, greeting, and colors for visitor messages, bot messages, and the fallback card. Choose a width, turn voice input on or off, and decide whether to suggest related questions when there is no exact match. A live preview shows your changes as you make them.

== External services ==

This plugin connects to external services. Here is what is sent, when, and why.

= Your AI provider (OpenAI or Anthropic) =

You choose one provider and supply your own API key. When you upload a document, its text is sent to that provider to draft question-and-answer pairs. This happens only during document processing. No data is sent to the AI provider when a visitor asks a question. The provider bills your account directly.

OpenAI: Terms of Use https://openai.com/policies/terms-of-use — Privacy Policy https://openai.com/policies/privacy-policy
Anthropic: Commercial Terms https://www.anthropic.com/legal/commercial-terms — Privacy Policy https://www.anthropic.com/legal/privacy

= Truebe.io =

No document text, questions, answers, or visitor data is ever sent to truebe.io.

Truebe.io Terms of Service: https://truebe.io/terms
Truebe.io Privacy Policy: https://truebe.io/privacy

== Installation ==

1. Install and activate the plugin.
2. Go to Truebe and open Settings.
3. Choose your AI provider (Claude or ChatGPT) and enter your API key. Use the built-in guide if you do not have one yet.
4. Open Upload Document and upload a PDF.
5. Open the Fact Library, review the drafted answers, and approve the ones you want live.
6. Add `[truebe_chat]` to any page or post to display the chatbot.

== Frequently Asked Questions ==

= Can I restrict the chatbot to answer only from my own content? =

Yes, completely. Truebe never uses a live AI model to answer a visitor, so there is no built-in model knowledge that can leak in. Visitors only ever see answers you approved from your own documents. Answering with anything else is not possible.

= Do I need my own AI key? =

Yes. Truebe uses your own OpenAI (ChatGPT) or Anthropic (Claude) account to read your documents and draft answers. The plugin includes a guided walkthrough to help you create an account and get a key. The AI provider bills you directly, usually a few cents per document.

= Is Truebe free? =

Yes.

= Does the chatbot use AI to answer visitors? =

No. The AI is used once, when you build answers from a document. At question time, Truebe matches the visitor's question to answers you already approved and shows the closest one. There is no live AI generation, so it cannot make anything up.

= What happens if a visitor asks something with no answer? =

Truebe can show related approved questions instead of a dead end and simply say it does not have an answer for that yet.

= Where are my answers stored? =

In your WordPress database and on your own server. Truebe does not store your documents or your approved answers.

= Can I edit the answers? =

Yes. Every drafted answer is editable before and after you approve it. You decide the exact wording a visitor sees.

= What file types can I upload? =

PDF or Word documents.

= How do I add the chatbot to my site? =

Add the `[truebe_chat]` shortcode to any page or post.

== Screenshots ==

1. Confident answers, not confident guesses — Truebe only speaks from documents you approved.
2. Connect your own AI key in minutes — Claude or ChatGPT.
3. Customize colors, greeting, and the no-answer message to match your brand.
4. Drop in a PDF, Word doc, or scan a URL — Truebe reads it and drafts answers.
5. Every drafted answer shows its exact source and page — approve before it ever reaches a visitor.
6. Visitors get sourced answers, or a logged "we don't know yet" with a way to reach you.

== Changelog ==

= 1.0.0 =
* Initial release.