The pipeline

    From uploaded file to answered question

    The full retrieval pipeline, managed.

    GTWYpipeline, indexes, retrieval
    Your platformyour brand, your storage caps
    Your customersone index each
    index cus_4127index cus_4128index cus_4129+413 more

    One index per customer.

    GTWY runs the pipeline. You run your product. Each of your customers gets their own index inside it — separate storage, separate retrieval scope, no shared pool to filter.

    Ingest

    What happens when a document is uploaded.

    01

    Parse

    Format detected and text extracted with structure preserved — headings, tables and lists survive as boundaries rather than collapsing into one blob. Scanned PDFs and images go through OCR first.

    02

    Chunk

    Recursive splitting on structural boundaries first, falling back to token windows. Default is roughly 800 tokens with ~15% overlap, so a sentence spanning a boundary is retrievable from either side.

    Chunk size and overlap are configurable per platform account.

    03

    Embed

    Chunks are embedded with the model you choose, on your provider key. Dimensionality follows the model — the index is built to match it, so switching models means a re-embed.

    04

    Index

    Vectors and their source text land in that customer’s own index, tagged with the document and chunk they came from so retrieval can cite them.

    Query

    What happens when the agent needs to know something.

    1. 01RetrieveHybrid search — vector similarity and keyword matching over that customer’s index only
    2. 02RerankCandidates reordered by relevance to the actual question before any of them reach the model
    3. 03ReturnPassages handed to the agent with their source document and chunk, so answers can cite

    All three happen inside the agent run. Retrieval is not billed separately and is not counted per query.

    Freshness

    When it becomes searchable, and when it stops being.

    After an upload

    Indexing starts as soon as the upload completes. A typical document is searchable within seconds; large files and OCR jobs take longer, and the status is visible to your user throughout.

    After an update

    Re-uploading a document replaces it. The old chunks are removed as the new ones land, so retrieval never returns both versions of the same passage.

    After a deletion

    Deletion removes the document and its chunks from the index. Once it is gone it cannot be retrieved, including by a run already in flight.

    Synced sources

    Connected sources re-check on a schedule you configure. Changed pages and files are re-ingested; removed ones are dropped from the index on the same pass.

    Embedding models

    Bring your own key.

    Your embedding costs stay on your provider account, at your negotiated rate. We never mark them up because we never touch them.

    Providers and models

    The major hosted embedding providers, with the model chosen per platform account. The index is built to that model’s dimensionality.

    Where the key lives

    Encrypted at rest, used only to embed your customers’ content, never exposed in the embed or to your users. Rotate or revoke it at any time.

    Changing model

    A model change re-embeds every document, and those tokens bill to your provider account. You see an estimate before it starts — a re-index never runs without a cost preview.

    If the key fails

    An invalid, revoked or rate-limited key stops ingest rather than failing quietly. Documents stay queued, the failure surfaces in the panel and on your alerting, and ingest resumes once the key works — so your users never sit on a knowledge base that silently stopped updating.

    Configuration

    What you control as the platform.

    GTWY panel · Knowledge configuration
    Chunk size800 tokens · 15% overlap
    Embedding modelYour key, your model
    Retrieval countTop 8 after rerank
    Similarity threshold0.72
    Sources your customers may connectUpload, Web, Drive, S3
    Storage cap2 GB / customer

    Observability

    What you see as the platform.

    Query logs

    What was asked, what was retrieved, and from which document.

    Retrieval quality

    Similarity scores and how often a query returns nothing usable.

    Storage per customer

    GB indexed per customer, against the cap you set.

    Ingest failures

    Which document, which stage, and why — parse, OCR, embed or index.

    Index freshness

    Last successful sync per connected source.

    Embedding spend

    Tokens embedded per period, so your provider bill is never a surprise.

    API

    If you’d rather not use the UI.

    The embed gives your users a document manager. These do the same things from your backend.

    Upload a document
    curl --url 'https://db.gtwy.ai/api/rag/resource'   -H 'authorization: <Bearer Token>'   -H 'content-type: application/json'   --data-raw '{
        "title": "<Your Document Title>",
        "description": "<Your Document Description>",
        "settings": { "strategy": "recursive", "chunkSize": 4000 },
        "collection_details": "<Your Collection Id>",
        "url": "<Your Document URL>"
      }'
    Query the index
    curl --url 'https://api.gtwy.ai/rag/query'   -H 'authorization: <Bearer Token>'   -H 'content-type: application/json'   --data-raw '{
        "query": "<Your Question>",
        "resource_id": "<Your Resource Id>"
      }'
    The upload UI
    <script
      id="rag-main-script"
      embedToken="Add your embed token here"
      src="https://chatbot.gtwy.ai/rag-prod.js"
      parentId="Id of parent Container"
      theme="dark/light"
      defaultOpen="true/false"
    ></script>

    See the pipeline on your documents.

    Bring a real file and we’ll ingest and query it live.

    Read the docs