Skip to main content

Opinions

How memory banks form, store, and evolve beliefs.

Prerequisites

Make sure you've completed the Quick Start to install the client and start the server.

What Are Opinions?

Opinions are beliefs formed by the memory bank based on evidence and disposition. Unlike world facts (objective information received) or experience (conversations and events), opinions are judgments with confidence scores.

TypeExampleConfidence
World Fact"Python was created in 1991"
Experience"I recommended Python to Bob"
Opinion"Python is the best language for data science"0.85

How Opinions Form

Opinions are created during reflect operations when the memory bank:

  1. Retrieves relevant facts
  2. Applies disposition traits
  3. Forms a judgment
  4. Assigns a confidence score
# Opinions are automatically formed when the bank encounters
# claims, preferences, or judgments in retained content
client.retain(
bank_id="my-bank",
content="I think Python is excellent for data science because of its libraries"
)

# The bank forms an opinion with confidence based on evidence

Searching Opinions

# Search for opinions on a topic
response = client.recall(
bank_id="my-bank",
query="What do you think about Python?",
types=["opinion"]
)

for opinion in response.results:
print(f"Opinion: {opinion.text}")
print(f"Confidence: {opinion.confidence}")

Opinion Evolution

Opinions change as new evidence arrives:

Evidence TypeEffect
ReinforcingConfidence increases (+0.1)
WeakeningConfidence decreases (-0.15)
ContradictingOpinion revised, confidence reset

Example evolution:

t=0: "Python is best for data science" (0.70)
↓ New evidence: Python dominates ML libraries
t=1: "Python is best for data science" (0.85)
↓ New evidence: Julia is 10x faster for numerical computing
t=2: "Python is best for data science, though Julia is faster" (0.75)
↓ New evidence: Most teams still use Python
t=3: "Python is best for data science" (0.82)

Disposition Influence

Different dispositions form different opinions from the same facts:

# Bank disposition affects how opinions are formed
# High skepticism = lower confidence, requires more evidence
# Low skepticism = higher confidence, accepts claims more readily

client.create_bank(
bank_id="skeptical-bank",
disposition={"skepticism": 5, "literalism": 3, "empathy": 2}
)

# Same content, different confidence due to disposition
client.retain(bank_id="skeptical-bank", content="Python is the best language")

Opinions in Reflect Responses

When reflect uses opinions, they appear in based_on:

# Opinions influence reflect responses
response = client.reflect(
bank_id="my-bank",
query="Should I use Python for my data project?"
)

# The response incorporates the bank's opinions with appropriate confidence
print(response.text)

Confidence Thresholds

Opinions below a confidence threshold may be:

  • Excluded from responses
  • Marked as uncertain
  • Revised more easily
# Low confidence opinions are held loosely
# "I think Python might be good for this" (0.45)

# High confidence opinions are stated firmly
# "Python is definitely the right choice" (0.92)