MechaMental
Guides

Managing Sources

Upload files, paste text, configure chunking and indexing, and monitor processing status.

Overview

Sources are knowledge documents that power retrieval in your AI pipelines. When uploaded, MechaMental processes them through extraction, chunking, embedding, and indexing so they can be searched semantically at runtime.

Supported Formats

FormatExtensionsNotes
PDF.pdfText extraction with layout awareness
Word.docxFull formatting support
Plain Text.txtDirect text processing
Markdown.mdPreserves structure and headings
CSV.csvRow-level chunking with headers
JSON.jsonStructured data processing
Images.png, .jpgOCR and visual analysis

Uploading a Source

Open the Create Source Dialog

  1. Navigate to Sources in the sidebar (for workspace-level sources) or to a namespace's Sources tab (for namespace-scoped sources)
  2. Click the New Source button (Plus icon)
  3. The Add Workspace Source dialog opens as a wide split-panel view

Fill In Source Details (Left Panel)

The left panel contains the metadata fields:

  • Name (required) -- a descriptive name, e.g., "Company Documentation"
  • Description -- brief description of the source content
  • Source Type -- auto-detected from the file, or manually override
  • Tags -- add tags for organization and filtering

Choose Input Method (Right Panel)

The right panel has two input modes, selectable via tabs:

Drag and drop files onto the upload area, or click to browse your device. You can upload multiple files at once. Supported file types are shown in the format table above.

Paste text content directly into a text area. Useful for snippets, notes, or content copied from other applications.

Configure Advanced Options

Expand the Advanced section at the bottom of the left panel:

  • Smart Chunking -- toggle on to use intelligent document-aware chunking instead of fixed-size splits
  • Indexing Strategy -- choose how aggressively to index:
StrategyDescription
StandardBalanced performance and recall
High RecallMaximize document retrieval at the cost of precision
High PrecisionPrioritize relevance over recall

Upload and Monitor Processing

Click the upload button. A progress indicator appears showing the current processing state.

The source transitions through these states in order:

  1. Created -- source record created
  2. Pending -- queued for processing
  3. Uploading -- file data being transferred
  4. Extracting -- text content being extracted from the file format
  5. Chunking -- text split into manageable chunks with overlap
  6. Embedding -- vector embeddings generated for each chunk
  7. Indexing -- chunks and embeddings stored in the vector index
  8. Completed -- source is ready for queries

Processing Status

You can monitor the status of every source in real time from the sources list. Each source shows a colored badge with its current state. If processing fails, the status shows Failed with an error message.

Source Scoping

Sources exist at one of two scopes:

  • Workspace -- available to all apps and namespaces in the workspace. Good for shared knowledge bases (company docs, FAQs).
  • Namespace -- scoped to a specific namespace within an app. Good for tenant-specific or context-specific documents.

When a source_query step runs, it can search workspace sources, namespace sources, or both, depending on the search scope configuration.

Managing Tags

Tags help you organize and filter sources. You can add tags when creating a source or edit them later. Use the Tags field in the source details, and filter the source list by tag using the filter controls at the top of the sources table.

Reindexing Sources

If you update the embedding model or change chunking settings, you can reindex existing sources without re-uploading the original files:

  1. Select the source (or namespace) you want to reindex
  2. Trigger Reindex from the source actions or namespace actions
  3. The source re-enters the processing pipeline (Extracting, Chunking, Embedding, Indexing)
  4. Existing chunks are replaced with newly generated ones

Using Sources in Pipelines

Add a Source Query step to your pipeline to retrieve relevant chunks at runtime:

  1. Set the Query to a Jinja template like {{ endpoint_payload.message }}
  2. Configure Top K (number of results) and Score Threshold (minimum similarity)
  3. Optionally pin specific sources to limit the search scope
  4. The step output contains the matched chunks, which you can reference in subsequent steps

See Configuring Step Types for full details on source step configuration.

On this page