Repository navigation
Conversation
Weaviate is adding a `decisions-*` module type, starting with decisions-typesafeai. A decisions module serves `rerank` like a reranker and also answers questions about every object a query returns. Collection configuration: - `Configure.Decisions.typesafeai(...)` and `Configure.Decisions.custom(...)` build a `decisions_config`, accepted by `collections.create()` and `collection.config.update()`. A collection has either a reranker or a decisions module: passing both is rejected, and an update replaces whichever the collection has. - `config.get()` returns `decisions_config` next to `reranker_config`. Queries: - `decide=` on every search method and on `fetch_objects` takes one or more questions built with `Decide.predicate`, `Decide.choice` or `Decide.score`. - Each returned object carries `decisions`, a mapping of question name to `DecisionAnswer` with the probability, choice, score, per-option probabilities, confidence, or a refusal. The integration tests run against the server's decisions-dummy module and skip when the server does not have it.
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2188 +/- ##
==========================================
+ Coverage 86.64% 88.95% +2.31%
==========================================
Files 300 310 +10
Lines 23172 24692 +1520
==========================================
+ Hits 20077 21965 +1888
+ Misses 3095 2727 -368 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…; drop the cache and over-fetch settings The server keeps at most one reranker and one decisions module per collection and an update replaces a module of its own kind only, so the client no longer rejects reranker_config next to decisions_config and merge_with_existing clears the module of the same kind only. decisions-typesafeai no longer has batchSize, fetchDepth, cache, scoreLevels and minScore: the module batches by default, the answer cache is gone and over-fetch and the rubric rerank are not in this version. The decide question factory is Decision (Decision.predicate, .choice, .score); Decide becomes the rerank input of a decision model in a later change.
4 tasks
Duplicate option or level names, an empty decide and decide with group_by are rejected client-side with the reasons the server would give. The decide docstrings and error name the Decision factory.
jfrancoa
force-pushed
the
jose/decisions-typesafeai
branch
from
October 13, 2026 13:24
e106f58 to
2275aaf
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Client support for the
decisions-*module type and thedecidequery argument, starting withdecisions-typesafeai.Server side: weaviate/weaviate#13477 (module type), weaviate/weaviate#13408 (
decisions-typesafeai), weaviate/weaviate#13484 (decideproperty, proto anddecisions-dummy). This PR carries the regenerateddecisions_pb2stubs from that proto. Support fordecisions-openaicomes in a stacked PR (#2189), andrerank=Decide(...)in #2198.Collection configuration
A collection has at most one reranker and at most one decisions module, and an update replaces the module of its own kind only.
Configure.Decisions.custom(name, settings)covers a module the client does not know. The settings aremodel,base_url,max_documents,min_probabilityandorder; the module batches requests by itself.Queries
decide=is accepted by every search method and byfetch_objects, and can be combined withrerank=. It never drops or reorders an object. It is not available withgroup_by.Tests
DecisionAnswer; the request carries the questions.integration/test_collection_decisions.py): runs against the server'sdecisions-dummymodule, whose answers are a function of the text; skips when the server lacks the module. Verified locally against a build of feat(modules): add the decide additional property weaviate#13484.ci/docker-compose.ymlenables the module, so the tests start running once a server image ships it.