- Console
- API
- Open Sources and select Connect source. The Connect a knowledge source dialog opens.
- Choose a source type and fill in the fields described below. The choices are under four headings. Websites and files: Website, Sitemap, File upload, OpenAPI schema and Custom answers. Knowledge bases: Zendesk Help Center, Confluence and Notion. Issues and support: Jira, Jira Service Management and Zendesk tickets. Community: Discourse forum and GitHub. For GitHub, also choose what to index: Files, Issues, Pull requests or Discussions, and tick This repository is private for a private one. Confluence, Notion, Jira, Jira Service Management, Zendesk tickets and a private repository then ask for a saved connection; their steps are on Confluence, Notion and Private GitHub.
- Select Connect source in the dialog. The source appears in the list and its first ingestion starts; its status updates as the job runs.
Sitemap
Reads exactly the URLs listed in asitemap.xml, without following links. This is the most predictable way to ingest a documentation site: you ingest what you publish, nothing more.
Listed URLs must be on the same origin as the sitemap.
Website
Crawls a site from a start URL, following links on the same origin (scheme, host and port). Use it when no sitemap exists.
Redirects are not followed, and links to images, media, archives, fonts, stylesheets and scripts are skipped.
GitHub
Reads files from a repository at a branch, tag or commit.
By default MITHUNAI skips
.git/, node_modules/, vendor/, dist/, build/, target/ and .venv/ at the root of the repository, and __pycache__ directories, minified JavaScript and lock files at any depth. A node_modules/ inside a package directory is not skipped by default; add **/node_modules/ to skip it. If you set exclude_paths, include any of those you still want skipped.
A public repository needs no token. To connect a private one, save a read-only GitHub token of your own as a connection and tick This repository is private: see Connect a private GitHub repository. A source never holds a token itself, and one that uses your connection never falls back to the deployment’s own GitHub access.
GitHub issues, pull requests and discussions
A repository’s conversations often hold answers its files do not: the workaround in a closed issue, the reasoning in a pull request, the accepted answer in a discussion. Each is a source of its own, so a repository can be connected for its files and again for its issues. In the console, choose GitHub, enter the repository asowner/repo, and choose Issues, Pull requests or Discussions. That is enough to connect it; select Change filters to narrow what is read. With the API, use the source type and settings below.
Comments written by bots are left out. A citation links to the issue, pull request or discussion on GitHub.
All three take the same settings:
A label filter takes up to 50 labels of up to 100 characters each.
Pull requests take three more:
With the API these three are the strings
"true" and "false", like every other configuration value.
Discussions are in beta, and GitHub serves them only to a signed-in caller, so they need a
GitHub token even for a public repository: either the GitHub access your MITHUNAI deployment is
configured with, or a GitHub connection of your own (tick This
repository is private and choose it). Without either, the source is created and its sync fails.
OpenAPI schema
Reads one OpenAPI 3.x or Swagger 2.x schema, in JSON or YAML, and turns each operation, one method on one path, into its own document: its summary, parameters, request body and responses. A question about one endpoint then finds that endpoint.- The schema must be readable without signing in.
- It must be no larger than your deployment’s fetch limit, which is 1 MiB by default.
- A
$refto another file or another host is not followed. If your schema is split across files, bundle it into one before you connect it.
Custom answers
Write the answer yourself for the questions where wording matters: a refund policy, a support address, a deprecation notice. A custom answers source holds question-and-answer pairs you type, and each pair becomes one document. In the console, choose Custom answers, name the set, and add your pairs.
The same question cannot appear twice in one source; case and spacing are ignored when comparing.
A custom answer is retrieved like any other passage of your content. The assistant uses it when it
is the best match for what was asked, and is not guaranteed to return it word for word.
configuration keys: question_1 and answer_1, question_2 and answer_2, and so on. The numbers set the order.
Zendesk Help Center
Reads the articles of a Zendesk help centre that a signed-out visitor can read. Each article becomes one document, and a citation links to the article.
Only public help centres can be connected. Drafts, internal articles and articles restricted to signed-in users are not read, and a help centre that requires signing in fails to sync. Images and attachments are not read.
Discourse forum
Reads the topics of a public Discourse forum. Each topic becomes one document holding its first posts, and a citation links to the topic.- Only public forums can be connected. Private categories and forums that require signing in are not read.
- Only the first 20 posts of a topic are read, so an answer posted later in a long topic is not included.
solved_onlyneeds a forum running the Solved plugin. On a forum without it, the sync fails rather than reading every topic.- A forum installed under a path, such as
example.com/forum, cannot be connected.
Path patterns
Ininclude_paths and exclude_paths:
A pattern must match the whole path. For a GitHub source the path is relative to the repository root:
docs/**/*.md,README.md ingests Markdown under docs/ and the root README. For a website or sitemap source the path is the URL’s, which starts with /: write /docs/**, not docs/**.
Choose the right source
Edit, pause or rename a source
Open a source’s menu on Sources.- Edit opens the form the source was connected with, filled in with its current settings. A source’s type cannot be changed, and an uploaded file has no settings to edit.
- Rename changes the name and nothing else.
- Pause stops the source being read, by you and by a scheduled re-sync. Its documents stay, and your assistant still answers from them. A run already in progress is not interrupted. Resume makes it readable again. Re-sync is unavailable while a source is paused.
Saving an edit does not read the source. Your assistant keeps answering from what the source held
before, until you sync it. The sync adds what the new settings match and removes what they no
longer do.
PATCH /knowledge/sources/{source_id} with any of name, configuration and status (active or paused). configuration replaces the stored configuration whole, so send every setting, not only the one you changed. Then sync the source.