{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["tabs","tab"]},"type":"markdown"},"seo":{"title":"Graph-aware embeddings and domain schemas","siteUrl":"https://platform.papr.ai","description":"Papr Memory is an AI-native memory layer that lets developers add production-ready memory to their AI agents and apps with just a few lines of code."},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"graph-aware-embeddings-and-domain-schemas"},"children":["Graph-aware embeddings and domain schemas"]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Terminology:"]}," We call this ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["graph-aware embeddings"]}," (concept) implemented via ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["holographic"]}," APIs (technology). When you see ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enable_holographic"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["holographic_config"]},", that's the implementation layer. When we discuss \"domain schemas\" and \"structured dimensions,\" that's the conceptual layer this guide focuses on."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"the-problem"},"children":["The problem"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Standard vector search ranks by \"semantic closeness\" but can't tell if two results are close for the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["same reason"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A code snippet about \"sorting arrays\" and \"sorting linked lists\" might be semantically near, but they use different algorithms, data structures, and APIs. A scientific claim about \"aspirin reduces heart attack risk\" and \"aspirin causes stomach bleeding\" are both about aspirin, but one supports use and the other warns against it."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"the-solution"},"children":["The solution"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Graph-aware embeddings"]}," solve this by encoding ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["structured domain dimensions"]}," alongside your base vector—things like programming language, operation type, evidence strength, temporal context, or custom fields you define. Search can then filter and boost by ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["topical alignment"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["domain-specific context"]},", and other axes beyond flat similarity."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Alongside your base vector, Papr extracts ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["registered domain dimensions"]}," (topic, time, intent, entities, and other fields you define) and encodes them into ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["fourteen frequency bands"]},". That makes retrieval sensitive to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["topical alignment"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["temporal and situational context"]},", and other axes your ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["frequency schema"]}," defines—beyond raw semantic recall."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Implementation:"]}," Uses Papr's holographic pipeline (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enable_holographic"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["holographic_config"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/holographic/*"]},"). This guide covers ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["concepts and schemas"]},"; API request/response shapes are in the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis"},"children":["API reference"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HolographicConfig"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CreateDomainRequest"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CustomFrequencyField"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/frequencies"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v1/holographic/domains"]},")."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"example-code-search-with-vs-without-graph-aware"},"children":["Example: Code search with vs without graph-aware"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Query:"]}," \"How do I sort a list in Python?\""]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"standard-semantic-search-without-graph-aware"},"children":["Standard semantic search (without graph-aware):"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns mixed results:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Python ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list.sort()"]}," ✅"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["JavaScript ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["array.sort()"]}," ❌ (different language)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Python sorting algorithms tutorial ⚠️ (conceptual, not code)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["SQL ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ORDER BY"]}," ❌ (different domain)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"with-graph-aware-embeddings-cosqa-schema"},"children":["With graph-aware embeddings (cosqa schema):"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns filtered results aligned on ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["language=Python"]}," and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["primary_operation=sorting"]},":"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Python ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list.sort()"]}," ✅"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Python ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sorted()"]}," function ✅"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Python custom sort with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["key="]}," ✅"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Python ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["heapq.nsmallest()"]}," for partial sorts ✅"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Why:"]}," The schema encodes ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["programming_domain"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["language"]},", and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["primary_operation"]}," dimensions. H-COND scoring boosts results with high alignment on these fields."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"why-it-matters"},"children":["Why it matters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Plain similarity"},"children":["Plain similarity"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Graph-aware embeddings"},"children":["Graph-aware embeddings"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"Close in embedding space\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"Close ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["and"]}," aligned on the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["same domain dimensions"]}," (e.g. same kind of code operation, same type of scientific claim, same topic lane)\""]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Weak on nuance (time, role, domain jargon)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tunable via ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["schema"]},": what to extract and how hard each dimension should matter (",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["weights"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["One-size-fits-all"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Built-in domains"]}," for common cases, or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["custom"]}," schemas for your vocabulary"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Choosing the right ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["frequency schema"]},"—built-in or custom—is the single biggest lever for retrieval quality when you enable this mode."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"built-in-schemas"},"children":["Built-in schemas"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Three schemas ship by default. Each defines ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["fourteen frequency dimensions"]}," tuned to its domain. Use their ids or shortnames (for example ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cosqa"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["scifact"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["general"]},") with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["frequency_schema_id"]}," on writes and in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["holographic_config"]}," on search. Inspect live definitions with ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /v1/frequencies"]}]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"cosqa--code-search"},"children":["cosqa — Code search"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Optimized for matching ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["code snippets"]}," to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["natural language"]}," queries. Reported on the CosQA benchmark: ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["+5.5% NDCG@10"]}," vs. cross-encoder baseline."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Hz"},"children":["Hz"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Dimension"},"children":["Dimension"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Weight"},"children":["Weight"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["programming_domain"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.6"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.5"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["language"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enum"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.8"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["query_intent"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["primary_operation"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["4.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["key_apis"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MultiValue"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["6.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["data_types_used"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MultiValue"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.8"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["8.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["operation_verbs"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MultiValue"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.7"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["10"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["secondary_apis"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MultiValue"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.5"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["14"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["return_behavior"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.8"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["18"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["input_output_signature"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.7"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["22"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["code_pattern"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.8"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["26"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["error_handling_pattern"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.5"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["30"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["design_paradigm"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.6"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["34"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["algorithm_technique"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.7"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"scifact--scientific-claims"},"children":["scifact — Scientific claims"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Optimized for matching ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["scientific claims"]}," to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["evidence"]}," passages. Reported on the SciFact benchmark: ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["+36% NDCG@10"]}," vs. baseline."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Hz"},"children":["Hz"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Dimension"},"children":["Dimension"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Weight"},"children":["Weight"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["scientific_field"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enum"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.7"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.5"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["claim_type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.9"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["methodology"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["evidence_strength"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enum"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.8"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["4.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["biological_entities"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MultiValue"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["6.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["chemical_compounds"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MultiValue"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.8"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["8.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["study_design"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.7"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["10"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["outcome_measures"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MultiValue"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.9"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["14"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["population_context"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.6"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["18"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["statistical_methods"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.7"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["22"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["causal_mechanism"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.8"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["26"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["temporal_context"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.5"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["30"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["contradiction_signals"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.6"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["34"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["confidence_level"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.7"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"general--general-purpose"},"children":["general — General purpose"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Domain-agnostic schema for ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["mixed content"]},". Use as a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["starting point"]}," for evaluation before specializing."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Hz"},"children":["Hz"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Dimension"},"children":["Dimension"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Weight"},"children":["Weight"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["topic_category"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.7"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.5"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["content_type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enum"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.6"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["primary_subject"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["intent"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["4.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["key_entities"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MultiValue"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.9"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["6.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["domain_terms"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MultiValue"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.8"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["8.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["action_verbs"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MultiValue"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.7"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["10"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["specificity"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enum"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.6"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["14"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["audience_level"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enum"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.5"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["18"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["sentiment"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enum"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.4"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["22"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["temporal_relevance"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.5"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["26"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["geographic_context"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FreeText"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.4"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["30"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["source_type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enum"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.5"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["34"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["complexity"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enum"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.6"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Table types (FreeText, Enum, MultiValue) describe the dimension; the API uses lowercase types on custom fields such as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["free_text"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enum"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["multi_value_text"]},"—see below."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"about-frequency-bands-hz-values"},"children":["About frequency bands (Hz values)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The built-in schemas show ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Hz"]}," values (0.1, 0.5, 2.0, etc.) representing the 14 standard ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["brain-inspired frequency bands"]}," in holographic encoding. When registering a custom schema, your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["frequency"]}," field must use one of these allowed values—see ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CustomFrequencyField"]}," in the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis"},"children":["API reference"]}," for the exact enum (e.g., 0.1, 0.5, 2.0, 4.0, 6.0, 10.0, 12.0, 18.0, 19.0, 24.0, 30.0, 40.0, 50.0, 70.0)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Rule of thumb:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Lower Hz (0.1–2.0)"]}," → Categorical/Enum dimensions (language, domain, contract type)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Mid Hz (4.0–14)"]}," → Descriptive/FreeText dimensions (intent, operation, methodology)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Higher Hz (18–70)"]}," → List/MultiValue dimensions (APIs, entities, key terms)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"registering-a-custom-domain-schema"},"children":["Registering a custom domain schema"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Define a schema for your own domain with ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/holographic/domains"]}]},". Custom schemas are scoped to your API key and map ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["up to fourteen"]}," fields onto the standard frequency bands. The reference defines allowed ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["frequency"]}," values and field types for ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CreateDomainRequest"]}]}," / ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CustomFrequencyField"]}]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /v1/holographic/domains\nX-API-Key: YOUR_KEY\nContent-Type: application/json\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"name\": \"acme:legal_contracts:1.0.0\",\n  \"description\": \"Legal contract analysis\",\n  \"fields\": [\n    { \"frequency\": 0.1, \"name\": \"contract_type\", \"type\": \"enum\", \"values\": [\"MSA\", \"NDA\", \"SOW\"], \"weight\": 0.8 },\n    { \"frequency\": 0.5, \"name\": \"jurisdiction\", \"type\": \"enum\", \"values\": [\"US\", \"EU\", \"UK\"], \"weight\": 0.7 },\n    { \"frequency\": 2.0, \"name\": \"primary_obligation\", \"type\": \"free_text\", \"weight\": 1.0 },\n    { \"frequency\": 4.0, \"name\": \"parties_involved\", \"type\": \"multi_value_text\", \"weight\": 0.9 }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"status\": \"success\",\n  \"schema_id\": \"acme:legal_contracts:1.0.0\",\n  \"domain\": \"legal_contracts\",\n  \"num_frequencies\": 4\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Using the registered schema:"]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"from papr_memory import Papr\n\nclient = Papr(x_api_key=\"YOUR_KEY\")\n\n# 1. Add memories with the custom schema\nmemory = client.memory.add(\n    content=\"Signed NDA with Acme Corp, jurisdiction: US, expires 2027-01-01\",\n    enable_holographic=True,\n    frequency_schema_id=\"acme:legal_contracts:1.0.0\"\n)\n\n# 2. Search with domain-specific filtering\nresults = client.memory.search(\n    query=\"Find all active NDAs in US jurisdiction\",\n    holographic_config={\n        \"enabled\": True,\n        \"frequency_schema_id\": \"acme:legal_contracts:1.0.0\",\n        \"frequency_filters\": {\n            \"contract_type\": 0.9,  # Must be 90%+ aligned on contract type\n            \"jurisdiction\": 0.8    # Must be 80%+ aligned on jurisdiction\n        }\n    }\n)\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"TypeScript"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"import Papr from '@papr/memory';\n\nconst client = new Papr({ xAPIKey: \"YOUR_KEY\" });\n\n// 1. Add memories with the custom schema\nconst memory = await client.memory.add({\n  content: \"Signed NDA with Acme Corp, jurisdiction: US, expires 2027-01-01\",\n  enable_holographic: true,\n  frequency_schema_id: \"acme:legal_contracts:1.0.0\"\n});\n\n// 2. Search with domain-specific filtering\nconst results = await client.memory.search({\n  query: \"Find all active NDAs in US jurisdiction\",\n  holographic_config: {\n    enabled: true,\n    frequency_schema_id: \"acme:legal_contracts:1.0.0\",\n    frequency_filters: {\n      contract_type: 0.9,  // Must be 90%+ aligned on contract type\n      jurisdiction: 0.8    // Must be 80%+ aligned on jurisdiction\n    }\n  }\n});\n","lang":"typescript"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"schema-design-principles"},"children":["Schema design principles"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Enum"]}," for categorical dimensions (language, contract type)—often on ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["lower"]}," Hz bands."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Free text"]}," for descriptive dimensions (intent, operation)—",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["mid"]}," bands."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Multi-value"]}," for lists (APIs, entities, compounds)—",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["higher"]}," bands."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Weight"]}," what discriminates: if language matters most, weight it ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1.0"]},"; if a dimension is mostly noise, weight it down (for example ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0.3"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["At most fourteen fields"]},"—one per frequency band in the holographic encoding."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Custom schema co-design with Papr"]}," is usually the fastest path to production-quality, domain-aware retrieval. The schema is what makes graph-aware search ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["tuned"]}," rather than ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["generic"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"how-this-maps-to-the-api"},"children":["How this maps to the API"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Goal"},"children":["Goal"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Where"},"children":["Where"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List schemas and aliases"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /v1/frequencies"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /v1/frequencies/{frequency_schema_id}"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Register a custom domain"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/holographic/domains"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List domains"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /v1/holographic/domains"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Index memories with graph-aware vectors"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enable_holographic"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["frequency_schema_id"]}," on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/memory"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT /v1/memory/{memory_id}"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Search with H-COND / filters"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["holographic_config"]}," on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/memory/search"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["BYOE base embedding"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/holographic/transform"]}," (and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/batch"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Rerank only"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/holographic/rerank"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Inspect extracted metadata"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/holographic/metadata"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["H-COND"]}," (holographic conditional scoring) uses ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["phase alignment"]}," between query and candidate metadata so ranking respects your schema dimensions, not only cosine distance. See ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HolographicConfig"]}]}," in the reference for scoring methods, filters, and tuning."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"do-you-need-graph-aware-embeddings"},"children":["Do you need graph-aware embeddings?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Follow this decision tree:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["1. Is your baseline search \"good enough\"?"]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"→ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Yes"]},": Skip graph-aware. Standard semantic + agentic graph is sufficient.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"→ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["No"]},": Continue ↓"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["2. Can you describe the quality gap in domain terms?"]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Examples: \"Returns Python when I need JavaScript,\" \"Mixes bug reports with feature requests,\" \"Can't distinguish claims vs counter-evidence\"",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"→ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Yes"]},": You have a domain mismatch → Continue ↓",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"→ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["No"]},": Your problem might be query quality or data sparsity, not embeddings"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["3. Does a built-in schema match your domain?"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["cosqa"]}," → Code search (snippet ↔ natural language)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["scifact"]}," → Scientific claims ↔ evidence"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["general"]}," → Mixed content domains",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"→ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Yes"]},": Start with built-in → Measure → Tune",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"→ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["No"]},": Continue ↓"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["4. Can you define 4-14 structured dimensions for your domain?"]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Examples: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["contract_type"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jurisdiction"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ticket_priority"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_intent"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["evidence_strength"]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"→ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Yes"]},": Register custom schema with Papr (co-design recommended)",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"→ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["No"]},": Graph-aware mode requires a schema; revisit when you can articulate dimensions"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"when-to-enable"},"children":["When to enable"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You need ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["topical, temporal, or domain-specific"]}," agreement—not just \"semantically nearby.\""]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You can commit to a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["schema"]}," (built-in or custom) and measure ranking."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You're willing to accept extra configuration complexity for quality gains."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"when-to-skip"},"children":["When to skip"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Simple RAG or small corpora where baseline search is enough."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You have not chosen a schema; graph-aware mode is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["schema-driven"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You haven't measured a concrete relevance gap—add after baseline metrics, not by default."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"see-also"},"children":["See also"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/guides/search-tuning"},"children":["Search tuning"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/guides/retrieval"},"children":["Retrieval"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/guides/memory-management"},"children":["Memory management"]}]}]}]},"headings":[{"value":"Graph-aware embeddings and domain schemas","id":"graph-aware-embeddings-and-domain-schemas","depth":1},{"value":"The problem","id":"the-problem","depth":2},{"value":"The solution","id":"the-solution","depth":2},{"value":"Example: Code search with vs without graph-aware","id":"example-code-search-with-vs-without-graph-aware","depth":2},{"value":"Standard semantic search (without graph-aware):","id":"standard-semantic-search-without-graph-aware","depth":3},{"value":"With graph-aware embeddings (cosqa schema):","id":"with-graph-aware-embeddings-cosqa-schema","depth":3},{"value":"Why it matters","id":"why-it-matters","depth":2},{"value":"Built-in schemas","id":"built-in-schemas","depth":2},{"value":"cosqa — Code search","id":"cosqa--code-search","depth":3},{"value":"scifact — Scientific claims","id":"scifact--scientific-claims","depth":3},{"value":"general — General purpose","id":"general--general-purpose","depth":3},{"value":"About frequency bands (Hz values)","id":"about-frequency-bands-hz-values","depth":2},{"value":"Registering a custom domain schema","id":"registering-a-custom-domain-schema","depth":2},{"value":"Schema design principles","id":"schema-design-principles","depth":2},{"value":"How this maps to the API","id":"how-this-maps-to-the-api","depth":2},{"value":"Do you need graph-aware embeddings?","id":"do-you-need-graph-aware-embeddings","depth":2},{"value":"When to enable","id":"when-to-enable","depth":2},{"value":"When to skip","id":"when-to-skip","depth":2},{"value":"See also","id":"see-also","depth":2}],"frontmatter":{"title":"Graph-aware embeddings","seo":{"title":"Graph-aware embeddings and domain schemas"}},"lastModified":"2026-04-22T01:40:48.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/graph-aware-embeddings","userData":{"isAuthenticated":false,"teams":["anonymous"]}}