Skip to main content
Insert a document. The iterator explodes it into chunks. The embedding index stays current. pxt service update starts the insert and search endpoints. Create the tables with pxt schema update app.py my_app, then open them with t = pxt.get_table('my_app.docs'). Cookbooks on this topic use pxt.create_table() so you can run cells without a project. An app puts the same columns on a TableModel in app.py and creates the tables with pxt schema update. This file uses sentence_transformer and document_splitter(..., separators='token_limit'), so install those packages before pxt schema update. sentence-transformers pulls in PyTorch. On a machine without a GPU, install the CPU wheel first, or pip fetches a CUDA build that can be several gigabytes:
Skip the torch line if you already have a GPU build of PyTorch.
pxt service list prints the service URL. POST /docs as multipart form data. The field name is document, the column in uploadfile_inputs. Point curl at a PDF, HTML, or .txt file on your machine. This page does not ship a sample file:
Search is JSON on /search:
From Python, insert the same local path (or a URL Pixeltable can fetch):
PDF, HTML, and XML use packages Pixeltable already installs (pypdfium2, beautifulsoup4, lxml), and .txt needs none. The other extensions need the packages in this table. Without them, or for an extension not in the table, the insert returns HTTP 422 INVALID_DATA_FORMAT: On Cloud, sign in with pxt login, or set PIXELTABLE_API_KEY. pxt org create provisions main. Then run pxt db update, pxt schema update, and pxt service update against pxt://org:main. Pixeltable Cloud. Export those tables for training: Datasets from media. Tool calls as columns: Agents.

RAG pipeline

POST /docs to insert. Chunks stay current.

Semantic text search

Rank chunks with {"query_text": "..."}.

Similar images

The same index pattern on images.

HTTP serving

Insert and search routes from the same file.
Last modified on October 30, 2026