Powerful AI Use Cases
Get Started in Minutes
From semantic search to AI agents, see how TiDB powers intelligent applications with simple APIs that feel familiar to developers.
1class Chunk(TableModel):
2 __tablename__ = "chunks"
3
4 id: int = Field(primary_key=True)
5 text: str = Field()
6 text_vec: list[float] = text_embed.VectorField(
7 source_field="text",
8 )
9 meta: dict = Field(sa_type=JSON)
10
11table = db.create_table(schema=Chunk, if_exists="overwrite")
12
13results = (
14 table.search(query_text)
15 .debug(True)
16 .filter({"meta.language": language})
17 .distance_threshold(distance_threshold)
18 .limit(query_limit)
19 .to_list()
20)
More Advanced Capabilities
Combine multiple search types and leverage enterprise features
Hybrid Queries
Combine vector similarity, full-text search, and structured data filtering in a single query for the most relevant results.
Real-time Analytics
Process and analyze data in real-time with HTAP capabilities for both transactional and analytical workloads.
Enterprise Ready
Built-in security, compliance, and scalability features for production AI applications.
Ready to dive deeper?
Customer Success Stories
See how leading AI companies are building with TiDB
Dify.AI
Unified AI Backend
Consolidated 8+ databases into one TiDB for metadata, context, and vectors. Perfect for startups feeling infrastructure pain.
Reduced infrastructure complexity by 80%
TOPRISM
Conversational BI
Powers real-time Chat2Query feature using TiDB's unified engine for complex analytics products.
Enabled real-time conversational analytics
APTSell
AI Digital Sales Employee
Uses TiDB as unified "brain" to connect CRM data, docs, and analytics for an agentic workflow.
Streamlined sales automation workflows
Ready to Master
Modern Development?
Start your learning journey today with comprehensive tutorials and examples. Learn at your own pace with practical, hands-on content.
Looking for Team Training?
Get customized training programs, dedicated support, and enterprise solutions for your development team.
Join Our Community
Connect with other AI developers, share your projects, and get help from our community of experts.