SQL functions
=============

AIDB functions are available as standalone SQL functions that you can
call directly in queries for one-off transformations, testing and
exploration, or to build custom workflows outside of the pipeline
framework.

Each page here focuses on usage context and examples. For terse
parameter tables and return types, see the API reference:

- Transformation functions (``chunk_text`` , ``parse_html`` ,
  ``parse_pdf`` , ``perform_ocr`` , ``summarize_text`` ) are in
  :ref:`Functions reference <Functions reference>` 

- Inference functions (``encode_text`` , ``decode_text`` ,
  ``rerank_text`` ) are in :ref:`Reference → Models <Pipelines API reference>`  .

.. csv-table::
  :header: Page,Functions,What it covers
  :widths: 12,25,15
  :align: left
  :class: longtable

  :ref:`Text chunking<Text chunking>` ,`aidb.chunk_text()`,Splitting text into segments for LLM context windows
  :ref:`Data parsing<Data parsing>` ,"`aidb.parse_html()`, `aidb.parse_pdf()`",Extracting readable text from HTML and PDF inputs
  :ref:`Performing OCR<Performing OCR>` ,`aidb.perform_ocr()`,Extracting text from images using an OCR-capable model
  :ref:`Summarization cookbook<Summarization cookbook>` ,"`aidb.summarize_text()`, `aidb.summarize_text_aggregate()`","Generating and aggregating AI-powered text summaries, use cases, and cookbook"
  :ref:`AI inference functions<AI inference functions>` ,"`aidb.encode_text()`, `aidb.decode_text()`, and variants",Embedding text and images into vectors; generating completions
  :ref:`Text reranking<Text reranking>` ,`aidb.rerank_text()`,Scoring and reordering candidate passages by relevance

!!!Note To use these operations as steps inside a pipeline, see
:ref:`Pipeline steps <Pipeline steps>`  .

.. toctree::
  :maxdepth: 3

  sql-functions--chunk-text
  sql-functions--parse
  sql-functions--perform-ocr
  sql-functions--summarize-text--index
  sql-functions--encode-decode
  sql-functions--rerank-text
