Commit Graph

31 Commits

Author SHA1 Message Date
Andy Lee
5c8921673a fix: auto-detect normalized embeddings and use cosine distance (#8)
* fix: auto-detect normalized embeddings and use cosine distance

- Add automatic detection for normalized embedding models (OpenAI, Voyage AI, Cohere)
- Automatically set distance_metric='cosine' for normalized embeddings
- Add warnings when using non-optimal distance metrics
- Implement manual L2 normalization in HNSW backend (custom Faiss build lacks normalize_L2)
- Fix DiskANN zmq_port compatibility with lazy loading strategy
- Add documentation for normalized embeddings feature

This fixes the low accuracy issue when using OpenAI text-embedding-3-small model with default MIPS metric.

* style: format
2025-07-27 21:19:29 -07:00
Andy Lee
b3e9ee96fa fix: resolve all ruff linting errors and add lint CI check
- Fix ambiguous fullwidth characters (commas, parentheses) in strings and comments
- Replace Chinese comments with English equivalents
- Fix unused imports with proper noqa annotations for intentional imports
- Fix bare except clauses with specific exception types
- Fix redefined variables and undefined names
- Add ruff noqa annotations for generated protobuf files
- Add lint and format check to GitHub Actions CI pipeline
2025-07-26 22:38:13 -07:00
yichuan520030910320
b6d43f5fd9 add gif 2025-07-25 00:12:35 -07:00
yichuan520030910320
0544f96b79 default main cli to openai add data dict as a args 2025-07-22 21:56:30 -07:00
yichuan520030910320
2ebb29de65 default main cli to openai 2025-07-22 21:55:18 -07:00
Andy Lee
43155d2811 fix: supress resources leak logs 2025-07-22 19:53:45 -07:00
Andy Lee
b3970793cf fix: cache the loaded model 2025-07-21 21:20:53 -07:00
yichuan520030910320
90d9f27383 update readme and main example 2025-07-17 15:03:22 -07:00
Andy Lee
f77c4e38cb perf: reuse embedding server for query embed 2025-07-16 16:12:15 -07:00
Andy Lee
e595bbb5fb feat: hint for users about wrong model name 2025-07-15 22:40:40 -07:00
Andy Lee
125c1f6f25 fix: model name 2025-07-15 21:48:45 -07:00
yichuan520030910320
dec3ee85fd fix main cli 2025-07-15 21:19:16 -07:00
Andy Lee
53c58fa755 perf: switch to tranditional pdf reader 2025-07-13 17:04:23 -07:00
Andy Lee
eb6f504789 Datastore reproduce (#3)
* fix: diskann zmq port and passages

* feat: auto discovery of packages and fix passage gen for diskann

* docs: embedding pruning

* refactor: passage structure

* feat: reproducible research datas, rpj_wiki & dpr

* refactor: chat and base searcher

* feat: chat on mps
2025-07-11 23:37:23 -07:00
yichuan520030910320
dafb2aacab update macos env 2025-07-08 14:37:41 -07:00
yichuan520030910320
6497e17671 add gpu chunk embedd and add complexity in hnsw 2025-07-08 18:40:52 +00:00
yichuan520030910320
dfca00c21b add mac support in this repo 2025-07-07 18:22:24 -07:00
yichuan520030910320
637dab379e add workaround code 2025-07-07 23:13:47 +00:00
yichuan520030910320
6fc57eb48e add reuse code 2025-07-07 21:07:00 +00:00
yichuan520030910320
95a653993a rm useless 2025-07-06 06:47:20 +00:00
Andy Lee
cf17c85607 Make DiskANN and HNSW work on main example (#2)
* fix: diskann zmq port and passages

* feat: auto discovery of packages and fix passage gen for diskann
2025-07-05 22:18:12 -07:00
yichuan520030910320
df63526503 merge main 2025-07-06 00:50:58 +00:00
yichuan520030910320
e92deee1e8 fix larger file read and add faq 2025-07-06 00:48:57 +00:00
Andy Lee
0aa84e147b feat: hnsw embedding server and csr format 2025-07-05 23:04:41 +00:00
yichuan520030910320
368474d036 fix larger file read and add faq 2025-07-03 23:25:36 +00:00
yichuan520030910320
a627abe794 fix file path bug still compatiable bug in hnsw search 2025-07-03 02:02:42 +00:00
yichuan520030910320
44815ee7fd add configuable funcname 2025-07-02 05:18:00 +00:00
yichuan520030910320
371e3de04e add configuable funcname 2025-07-01 05:02:01 +00:00
yichuan520030910320
b81b5d0f86 256 cannot work but increase chunk size can 2025-07-01 04:09:18 +00:00
yichuan520030910320
ee507bfe7a Initial commit 2025-06-30 11:01:12 +00:00
yichuan520030910320
46f6cc100b Initial commit 2025-06-30 09:05:05 +00:00