Skip to content

fndome/xb-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xb Examples

xb 框架的示例项目集合

这是一个独立的项目,包含 xb 框架的各种使用示例。


📁 项目结构

xb-example/
├── README.md                  # 本文件
├── qdrant-app/               # Qdrant 向量数据库示例
├── pgvector-app/             # PostgreSQL + pgvector 示例
├── rag-app/                  # RAG (检索增强生成) 示例
└── pageindex-app/            # 分页索引示例

🚀 快速开始

1. Qdrant 向量搜索示例

cd qdrant-app
go mod tidy
go test -v

演示功能:

  • ✅ 向量搜索
  • ✅ 推荐查询
  • ✅ 过滤器组合
  • ✅ Custom 预设模式

2. PostgreSQL + pgvector 示例

cd pgvector-app
go mod tidy
go test -v

演示功能:

  • ✅ SQL + 向量混合查询
  • ✅ 动态过滤
  • ✅ 分页

3. RAG 示例

cd rag-app
go mod tidy
go test -v

演示功能:

  • ✅ 检索增强生成
  • ✅ 语义搜索
  • ✅ 上下文重排序

4. 分页索引示例

cd pageindex-app
go mod tidy
go test -v

演示功能:

  • ✅ 高性能分页
  • ✅ 索引优化
  • ✅ 游标遍历

📚 相关链接


🎯 学习路径

  1. 入门: 从 qdrant-app 开始,了解基础 API
  2. 进阶: 查看 pgvector-app,学习跨数据库查询
  3. 高级: 研究 rag-app,掌握 AI 应用场景
  4. 性能: 学习 pageindex-app,优化分页性能

📝 贡献

欢迎提交新的示例项目!

要求

  • ✅ 包含完整的 README
  • ✅ 包含可运行的测试
  • ✅ 代码注释完整
  • ✅ 使用 xb 的最佳实践

📄 License

Apache License 2.0


Version: v1.1.0
Last Updated: 2025-11-01

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published