ExamplescriptintermediateRunnableresearch-brief
Search
Runnable example (intermediate) for script using docling, ipykernel.
Key Facts
- Level
- intermediate
- Runtime
- Python • OpenAI API
- Pattern
- Context-backed research with explicit evidence
- Interaction
- Live sandbox • Script
- Updated
- 14 March 2026
Navigate this example
Library
Browse examplesReopen the wider library to compare adjacent patterns and linked learning paths.Interaction
Run sandbox nowTry the interaction directly in this example’s guided sandbox surface.Source
Open full sourceRead the real implementation, highlighted checkpoints, and runtime requirements.MCP
Call via MCPUse the same resource inside agents, deterministic exports, and MCP setup flows.
Linked principles
4-search.py
python
import lancedb
# --------------------------------------------------------------
# Connect to the database
# --------------------------------------------------------------
uri = "data/lancedb"
db = lancedb.connect(uri)
# --------------------------------------------------------------
# Load the table
# --------------------------------------------------------------
table = db.open_table("docling")
# --------------------------------------------------------------
# Search the table
# --------------------------------------------------------------
result = table.search(query="what's docling?", query_type="vector").limit(3)
result.to_pandas()
Related principles
- P4trustApply progressive disclosure to system agencyProvide the minimum information necessary by default, while enabling users to inspect additional detail when confidence, understanding, or intervention is required.Open principle →
- P6visibilityExpose meaningful operational state, not internal complexityPresent the state of the system in language and structures that are relevant to the user, rather than exposing low-level internals that do not support action or understanding.Open principle →
- P7trustEstablish trust through inspectabilityUsers should be able to examine how a result was produced when confidence, accountability, or decision quality is important.Open principle →