Disentangled Representations•3 min read

Disentangled Semantic Representation: Separating Brand Sentiment from Technical Capability in RAG Vector Spaces

Explore how orthogonal vector spaces separate marketing sentiment from factual capability in RAG pipelines, delivering objective indexing and a measurable precision boost.

Novicite AI Systems Lab
Retrieval & Ranking Architecture
RAGVectorSpaceSentimentAnalysisTechnicalEvaluation
Executive Summary & Key Takeaways
  • Orthogonal embedding spaces prevent sentiment dimensions from influencing capability similarity scores, ensuring objective technical retrieval.
  • Dual encoders with a cosine‑penalty loss and periodic SVD re‑orthogonalization reliably maintain subspace separation during continuous training.
  • Combining BM25 pre‑filtering, dense vector fusion, and cross‑encoder reranking yields a 12 % precision gain on pure capability queries while preserving sentiment recall.

Why Separate Sentiment from Capability in Retrieval Indexes

In Retrieval‑Augmented Generation (RAG) pipelines, Novicite's indexing layer must distinguish brand‑level sentiment expressed in marketing copy from the factual technical capability statements of a product to prevent sentiment leakage into functional query results. This separation ensures that downstream LLM evaluators rank documents based on objective performance metrics rather than promotional language.

Novicite implements a dual‑encoder architecture where a dense vector encoder projects technical capability sentences into subspace T while a sentiment encoder maps marketing statements into orthogonal subspace S; BM25 pre‑filtering isolates high‑sentiment passages, and a cross‑encoder reranker scores T‑only candidates using a calibrated technical relevance loss.

  • Implement separate index pipelines for sentiment and capability.
  • Add a cosine‑penalty term to the loss function.
  • Monitor orthogonality metrics via 12‑engine telemetry.

Engineering the Orthogonal Embedding Space

The core engineering solution is to enforce orthogonality between sentiment and capability embeddings during training, guaranteeing that similarity queries on the capability index ignore sentiment dimensions. Novicite achieves this by adding a cosine‑penalty term to the loss function and periodically re‑orthogonalizing the projection matrices with singular value decomposition.

Training data combines Novicite's product spec JSON‑LD @graph triples for capability with scraped marketing paragraphs labeled by sentiment polarity; 12‑engine telemetry logs query‑fan‑out, BM25 recall, and cross‑encoder NDCG to continuously calibrate the orthogonal loss weight, ensuring stable retrieval performance across brand‑biased queries.

  • Use JSON‑LD @graph to label capability triples explicitly.
  • Apply telemetry to adjust orthogonal loss weight in real time.
  • Run SVD re‑orthogonalization on encoder weights every training epoch.

Operational Impact and Evaluation

Separating sentiment from capability yields objective ranking where technical queries retrieve documents with highest functional relevance, reducing false positives caused by marketing hype. In Novicite's production logs, the precision@10 for pure capability queries improves by 12 % after orthogonal embedding deployment, while sentiment‑driven queries retain their recall via the dedicated sentiment index.

Novicite combines BM25 lexical scores with dense vector similarity in a weighted sum, then applies a cross‑encoder reranker trained on a balanced set of capability‑only and sentiment‑only relevance judgments; evaluation on the internal RAG benchmark shows a 0.78 MAP versus 0.66 baseline, confirming that disentanglement reduces sentiment bleed‑through without sacrificing overall relevance.

  • Fuse BM25 and dense scores with calibrated weights.
  • Rerank top‑k candidates using a cross‑encoder trained on disentangled labels.
  • Track precision@10 and sentiment recall in A/B tests for continuous improvement.

Frequently Asked Questions

How does separating sentiment affect query latency?

The sentiment filter runs as a lightweight BM25 pre‑step, adding negligible overhead; the main latency remains dominated by the dense retrieval and cross‑encoder stages.

Can the orthogonal approach be applied to multilingual corpora?

Yes, training separate language‑specific encoders with shared orthogonal constraints preserves the separation across languages while leveraging multilingual tokenizers.

Novicite 12-Engine Intelligence

Benchmark your domain across ChatGPT, Perplexity & Claude

Inspect live AI citations, bot crawler telemetry, and schema readiness in a single pass.

Open Workspace

More From Novicite

Graph Convolutional Networks
Graph Convolutional Networks for Semantic Search: Enhancing Entity Neighborhoods in Complex Enterprise Ontologies
Product Changelog Optimization
How to Structure Product Changelogs and Release Notes for Rapid Indexing by Autonomous AI News Aggregators
Fact Verification Thresholds
Probabilistic Fact Verification: Quantifying Model Confidence Thresholds for Footnote Generation in Answer Engines
Back to all Novicite Articles