Instructions to use Purdy0228/ConvMemory-OPC-V3-Validity-Context with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Purdy0228/ConvMemory-OPC-V3-Validity-Context with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Purdy0228/ConvMemory-OPC-V3-Validity-Context") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
ConvMemory OPC-v3 Validity Context
This is the OPC-oriented ConvMemory v3 validity context checkpoint. It is not a standalone Chinese retriever and it is not the OPC student reranker. It scores query/source/target triples to decide whether a target memory should be surfaced as possibly outdated for the current query.
USER_QUERY + SOURCE_EVIDENCE -> TARGET_MEMORY
Usage
from convmemory import ValidityEvidenceModule
module = ValidityEvidenceModule.from_pretrained(
"Purdy0228/ConvMemory-OPC-V3-Validity-Context",
device="cuda", # or "cpu"
)
scores = module.score_evidence_pairs([
{
"query": "What is the current pricing plan?",
"source": {"text": "Later update: pricing changed from 99/299 to 129/399."},
"target": {"text": "Earlier note: pricing was 99/299."},
}
])
Package Integration
Use convmemory>=0.6.2 when attaching this checkpoint to ConvMemory. Pass
preselected later updates through validity_source_map to keep one validity
scorer call per protected target. Without a map, the package uses a bounded
Chinese-aware top-1 lexical fallback.
Selected Recipe
- Source experiment:
v632_opcos_v3_posrepeat8_checkpoint - Selection report:
v634_opcos_v3_final_selection - Base model:
BAAI/bge-reranker-v2-m3 - Module format:
convmemory_validity_evidence - Threshold:
0.05 - Source policy: top-1 later update evidence
Evaluation Snapshot
| Evaluation | Pair accuracy | Demote recall | Protect recall | Scenario all-correct |
|---|---|---|---|---|
| synthetic base/hard/natural | 100.00% | 100.00% | 100.00% | 100.00% |
| handwritten OPC smoke | 98.96% | 100.00% | 98.81% | 91.67% |
The handwritten smoke set has 12 update scenarios and 96 query/source/target pairs. One known remaining edge is a change-query false demotion: when the user asks for the change history itself, the old memory should remain visible.
Recommended Use
Use after ordinary retrieval/reranking:
dense / ConvMemory / teacher retrieval
-> pick one later update source per candidate
-> OPC-v3 validity context
-> context annotation by default
-> demote only for explicit current-state queries
For ordinary semantic retrieval over scattered notes, use a strong Chinese embedding model or the OPC student reranker. This checkpoint is for validity and update handling.
Boundary
This checkpoint does not claim generic Chinese semantic retrieval, a mature OPC-v2 selector, full automatic dependency graph construction, or universal automatic demotion for every query type.
See the GitHub documentation for the package API and safety contracts: https://github.com/pth2002/ConvMemory