← back to invincible-jha__aumai-confidentialrag

All specs 4 total

All specs Real LLM only Function bodies
_tfidf_scoreREAL LLM gemma4:latest · · unknown
src/aumai_confidentialrag/core.py
Calculates a normalized relevance score based on term frequency for a given set of query terms against a document. It accepts a list of strings representing query terms and a single string representing the document content. The function returns a floating-point number between 0.0 and 1.0, representing the average term frequency across all query terms in the document. No external state is modified by this operation.
_tfidf_scoreREAL LLM gpt-oss:latest · · unknown
src/aumai_confidentialrag/core.py
Computes a TF‑based relevance score between a list of query terms and a document string. It tokenizes the document,
_tfidf_scoretemplated static_v1 · O(n) · Apache-2.0
src/aumai_confidentialrag/core.py · L195
Function `_tfidf_score` with 2 parameter(s); returns `float`.
_tfidf_scoretemplated gemma4 · O(N) · Apache-2.0
src/aumai_confidentialrag/core.py · L195
The function computes a normalized relevance score that measures the match strength between a provided list of query terms and a target document. It first calculates the raw Term Frequency (TF) for each query term by dividing its count within the document by the total number of terms in the document. These individual TF values are then summed together. Finally, the total sum is normalized by dividing it by the total number of query terms, ensuring the resulting score is scaled between 0 and 1.