Login to follow
BM25Engine

BM25Engine (ODC)

Stable version 0.1.3 (Compatible with ODC)
Uploaded on 10 Jul by Michael Guzman
BM25Engine

BM25Engine (ODC)

Details
Detailed Description

BM25Engine is a stateless C# External Logic component for OutSystems Developer Cloud (ODC). It adds native BM25 lexical search scoring to an ODC RAG pipeline without any external search service dependency.

Semantic vector search encodes meaning. It fails silently when a query contains an exact identifier: an error code, a field name, a version string. BM25Engine solves that gap. It scores chunks by term frequency and rarity, not semantic proximity.

Three Server Actions are exposed to ODC:

  • TokenizeText: tokenizes and Porter-stems a text string
  • IndexChunk: returns per-term frequencies for a document chunk
  • ScoreQuery: computes BM25 scores for a candidate posting set

No NuGet dependencies. No outbound HTTP calls. No shared mutable state between calls. Built against .NET 8.0.

Limitations
  • English only. Porter stemmer and stop-word list are English-specific.
  • Linear scan at query time. No scale ceiling has been load-tested. Posting fan-out for common terms will eventually become the bottleneck at corpus scale.
  • No mismatch detection. If the tokenizer changes, TokenizerVersion must be updated and the full corpus reindexed manually.
  • DocumentFrequency staleness. IDF values are recomputed on a timer, not at ingestion. Recently indexed chunks may not be reflected immediately.
  • BM25Stats must exist before search. RecomputeBM25Stats must run after the first index. If BM25Stats has no row, ScoreQuery divides by zero.
  • No entity ownership. The consuming app must implement all BM25 entities and the indexing workflow.
Release notes 

Upgraded from .NET 8.0 to .NET 10.0

License

https://opensource.org/licenses/BSD-3-Clause