Local LLM / Local RAG and private knowledge
Local LLM: Vector dimension checks
Store dimension and embedding revision in index metadata and validate on insert and query.
Environment and inputs: Private document retrieval with local embedding and generation endpoints; network and storage privacy require verification.
When to use it
A local generator does not by itself guarantee a private retrieval pipeline. Trace document extraction, embedding, indexing and answer generation as separate stages, retaining source locations and access metadata throughout the pipeline.
Practical example
Illustrative compatibility check. Real systems must also compare model revision, normalization and index configuration.
expected_dimension = 3
vector = [0.1, 0.2, 0.3] # synthetic demonstration only
if len(vector) != expected_dimension:
raise ValueError('Embedding dimension does not match index')
Check the result
Send a vector of the wrong dimension and verify a clear compatibility error.
Save and compare results
Save the test input, configuration and result. Fix the failing boundary, repeat the same test and compare it with the saved working configuration.
Scope and limits
These exercises have not been tested on your systems. Check feature support and configuration names against the installed release and linked documentation.