Commit Graph
1855 Commits
Author SHA1 Message Date
davidmezzetti 7e3c0e16a4 Add video link v9.7.0 2026-03-17 13:32:32 -04:00
davidmezzetti d12a6681ea Add agent tools example notebook, closes #1062 2026-03-16 14:51:49 -04:00
davidmezzetti 80b90cdbd6 Update comment 2026-03-14 13:16:50 -04:00
davidmezzetti 6343779678 Apply sigmoid to fused BB25 scores, closes #1053 2026-03-14 13:14:29 -04:00
davidmezzetti 2d50a4c202 Add coding agent toolkit, closes #1054 2026-03-14 07:33:17 -04:00
davidmezzetti d2b3758005 Add write tool, closes #1061 2026-03-14 07:32:17 -04:00
davidmezzetti 4c03a8106f Add todowrite tool, closes #1060 2026-03-14 07:31:12 -04:00
davidmezzetti 8f583b2446 Add read tool, closes #1059 2026-03-14 07:30:37 -04:00
davidmezzetti e9c34adde3 Add grep tool, closes #1058 2026-03-14 07:30:02 -04:00
davidmezzetti 6ee6656d40 Add glob tool, closes #1057 2026-03-14 07:29:29 -04:00
davidmezzetti f388ecb4a1 Add edit tool, closes #1056 2026-03-14 07:28:57 -04:00
davidmezzetti 1a0b11654b Add bash tool, closes #1055 2026-03-14 07:28:24 -04:00
JiangNan 79908eee5a Fix translation chunk concatenation when showmodels is enabled (#1052)
* Fix translation chunk concatenation when showmodels is enabled

When translating long text that gets split into multiple chunks by the
tokenizer, the translate() method combines results from the same source
text segment. With showmodels=True, each result is a tuple (path, text).
Using += to combine tuples produces (path, text1, path, text2) instead
of the expected (path, text1+text2). This causes a ValueError when the
caller unpacks with "model, op = outputs[y]" since there are too many
values.

Fix by explicitly concatenating only the text portion of the tuple when
showmodels is enabled.

Signed-off-by: JiangNan <[email protected]>

* Add unit test for showmodels with chunked translation

Adds testLongTranslationWithShowmodels to verify that when text is long
enough to be chunked by the tokenizer, the showmodels result is still a
proper 3-tuple (translation, language, model) and not a malformed tuple
from incorrect concatenation.

Signed-off-by: JiangNan <[email protected]>

* Shorten test method name to fix build

Rename testLongTranslationWithShowmodels -> testShowmodelsChunked
as the previous name was too long for the test runner.

Signed-off-by: JiangNan <[email protected]>

---------

Signed-off-by: JiangNan <[email protected]>
2026-03-09 14:39:54 -04:00
davidmezzetti 69cc7538ac Remove coveralls build script workaround 2026-03-04 13:33:59 -05:00
davidmezzetti 0e3b7ff959 Bump version 2026-02-25 14:42:11 -05:00
davidmezzetti cd116aaa57 Add build script workaround while coveralls is down v9.6.0 2026-02-25 11:33:27 -05:00
davidmezzetti d1aa381e0e Add build script workaround while coveralls is down 2026-02-25 10:54:42 -05:00
davidmezzetti 96234c5754 Reformat docs 2026-02-24 17:36:25 -05:00
davidmezzetti 312f1653e7 Reformat docs 2026-02-24 17:33:52 -05:00
davidmezzetti 5cd7d7e407 Cache Agent Template, closes #1051 2026-02-24 17:08:54 -05:00
davidmezzetti 1a64d33823 Improve subindexes documentation 2026-02-24 17:07:36 -05:00
davidmezzetti 3073589ad6 Add deterministic setting to database functions closes #1048. Add ability to index database expressions #1049 2026-02-22 16:38:54 -05:00
davidmezzetti 2f2bd50027 Add ability to index database expressions, closes #1049 2026-02-22 16:37:11 -05:00
davidmezzetti f7380f64da Add store field to columns configuration, closes #1050 2026-02-22 16:36:08 -05:00
davidmezzetti a53b431492 Add support for custom SQL functions with DuckDB, closes #1047 2026-02-21 06:43:56 -05:00
davidmezzetti 2c937db56b Add sparse normalization info to docs 2026-02-21 06:43:24 -05:00
Jaepil Jeong ba0d1eaead Add BB25 normalization for sparse encoders (#1046)
* Add log-odds conjunction fusion for BB25 hybrid search

BB25 normalization outputs calibrated probabilities, but the existing
hybrid fusion uses convex combination which discards the Bayesian
probability semantics. This causes BB25 to regress on 4/5 BEIR datasets.

Add log-odds conjunction fusion (from "From Bayesian Inference to Neural
Computation") that correctly combines probability signals in logit space
with per-query dynamic calibration for dense cosine scores.

- scoring/normalize.py: Extract Bayesian method check into isbayes()
- scoring/base.py: Add default isbayes() returning False
- scoring/tfidf.py: Add isbayes() delegating to normalizer
- search/base.py: Add logodds(), convex(), rrf() fusion methods;
  dispatch based on isbayes()

BEIR nDCG@10 results (BB25+LogOdds vs Default):
  arguana +2.23, fiqa +2.03, scidocs +0.62, scifact +1.33, nfcorpus -1.96

* Extract Hybrid class for score fusion strategies

Move logodds, convex, and rrf fusion methods from Search into
a dedicated Hybrid class, following the same pattern as Normalize.

* Fix coding convention issues in Hybrid class for CI

- Fix black formatting: remove unnecessary parentheses, remove spaces around **
- Fix pylint too-many-branches: extract calibrate() method from logodds()
- Fix pylint unused-variable: rename score to _ in rrf()

* Add BB25 normalization for sparse encoders and fix IVFSparse topn bug

- Support `normalize: bb25` config for sparse encoder scoring, enabling
  Bayesian sigmoid calibration as an alternative to default linear
  normalization. Reuses existing Normalize.bayes() infrastructure.

- Fix dimension check in IVFSparse.topn(): use scores.shape[1] (number
  of data items) instead of scores.shape[0] (number of queries) for the
  argpartition kth bound check. The previous code caused ValueError when
  the number of centroids was less than nprobe.

* Add tests for BB25 sparse normalization and IVFSparse topn fix
2026-02-20 14:40:18 -05:00
davidmezzetti 89299926bd Add additional methods 2026-02-18 15:44:59 -05:00
davidmezzetti 00acd243b0 Code standardization and added tests #1041 2026-02-18 14:18:11 -05:00
Jaepil Jeong 48f0962a44 Add log-odds conjunction fusion for BB25 hybrid search (#1041)
* Add log-odds conjunction fusion for BB25 hybrid search

BB25 normalization outputs calibrated probabilities, but the existing
hybrid fusion uses convex combination which discards the Bayesian
probability semantics. This causes BB25 to regress on 4/5 BEIR datasets.

Add log-odds conjunction fusion (from "From Bayesian Inference to Neural
Computation") that correctly combines probability signals in logit space
with per-query dynamic calibration for dense cosine scores.

- scoring/normalize.py: Extract Bayesian method check into isbayes()
- scoring/base.py: Add default isbayes() returning False
- scoring/tfidf.py: Add isbayes() delegating to normalizer
- search/base.py: Add logodds(), convex(), rrf() fusion methods;
  dispatch based on isbayes()

BEIR nDCG@10 results (BB25+LogOdds vs Default):
  arguana +2.23, fiqa +2.03, scidocs +0.62, scifact +1.33, nfcorpus -1.96

* Extract Hybrid class for score fusion strategies

Move logodds, convex, and rrf fusion methods from Search into
a dedicated Hybrid class, following the same pattern as Normalize.

* Fix coding convention issues in Hybrid class for CI

- Fix black formatting: remove unnecessary parentheses, remove spaces around **
- Fix pylint too-many-branches: extract calibrate() method from logodds()
- Fix pylint unused-variable: rename score to _ in rrf()
2026-02-18 09:22:45 -05:00
davidmezzetti 1c181e4070 Update docs 2026-02-16 19:05:41 -05:00
davidmezzetti 371d5d8a19 Add test for bb25 2026-02-16 19:01:44 -05:00
davidmezzetti 834e4eb60d Fix cursor error with multithreaded keyword search, closes #1039 2026-02-16 19:01:27 -05:00
davidmezzetti fc579d77aa Update dtype to np.float32 2026-02-16 15:54:22 -05:00
Sigrid Jin (ง'̀-'́)ง oO 90e66075f6 Add Bayesian normalization "bb25" method for keyword scoring (#1037)
* Add Bayesian normalization for keyword scoring

* Add BB25 alias docs and references

* Align BB25 normalization with cognica candidate-set behavior
2026-02-16 15:53:26 -05:00
davidmezzetti 99339570cb Add new features to ngram tokenizer, closes #1038 2026-02-16 15:47:03 -05:00
davidmezzetti 38170a4ab1 Support ngram tokenization, closes #1017 2026-02-16 09:41:41 -05:00
Rin 5a66065b34 Escape single quotes in dynamic column names to prevent SQL injection (#1026) 2026-02-15 10:50:45 -05:00
davidmezzetti 090937a396 Bump version 2026-02-12 17:42:47 -05:00
davidmezzetti d6bd6fc4c6 Slight code improvement v9.5.0 2026-02-11 13:29:54 -05:00
davidmezzetti 90bee00f1d Add ability to store agent memory by session, closes #1025 2026-02-11 13:18:18 -05:00
davidmezzetti f013ca7d1d Workaround macOS test failure 2026-02-10 13:12:37 -05:00
davidmezzetti bfd1f13f2b Workaround macOS test failure 2026-02-10 12:20:32 -05:00
davidmezzetti f682fd949a Fix issue with latest version of FastAPI, closes #1022 2026-02-10 10:46:41 -05:00
davidmezzetti 4758907f3b Add input merging modes for language modeling training, closes #1021. Closes #1020 2026-02-10 09:42:23 -05:00
davidmezzetti b9cec19941 Update docs 2026-02-04 13:18:47 -05:00
davidmezzetti b7c9b156f6 Add example demonstrating how to use skill.md files, closes #1019 2026-02-04 13:18:39 -05:00
davidmezzetti 361b6fe2a5 Add example demonstrating how to use agents.md files, closes #1018 2026-02-04 13:18:21 -05:00
davidmezzetti 45e6080999 Update templates for agent memory 2026-02-04 13:17:49 -05:00
davidmezzetti 92461fe651 Add support for Agent memory, closes #1016 2026-01-30 16:22:01 -05:00