Skip to content

Instantly share code, notes, and snippets.

@patham9
Last active November 27, 2025 21:30
Show Gist options
  • Select an option

  • Save patham9/67bb09bbe40c3451381eb315bb69cd96 to your computer and use it in GitHub Desktop.

Select an option

Save patham9/67bb09bbe40c3451381eb315bb69cd96 to your computer and use it in GitHub Desktop.
NARS-GPT: Whale disease example
//Input: Whales are mammals that live in the ocean.
<(whale * ocean) --> live_in>. :|: {1.0 0.9}
//Input: Animals that live in the ocean are marine animals.
<(animal * ocean) --> live_in>. :|: {1.0 0.9}
<animal --> marine_animal>. :|: {1.0 0.9}
//Input: Marine mammals are exposed to pollutant P.
<(marine_animal * pollutant_p) --> are_exposed_to>. :|: {1.0 0.9}
//Input: Exposure to pollutant P increases the risk of Disease Z.
<(pollutant_p * the_risk_of_disease_z) --> increase>. :|: {1.0 0.9}
//Input: Are whales at risk of disease z, and if so what are all relevant memory items and your confidence?
//Output: Yes, whales are at risk of disease z. Relevant memory items: i=1, i=2, i=8, i=11. Confidence: 0.13045568000000002.
//Memory:
i=0: animal live_in ocean. confidence=0.473684
('<(animal * ocean) --> live_in>', 'eternal') (2, 1, (1.0, 0.473684), [2])
i=1: whale live_in ocean. confidence=0.473684
('<(whale * ocean) --> live_in>', 'eternal') (1, 1, (1.0, 0.473684), [1])
i=2: whale isa marine_animal. time=3 confidence=0.14495078400000003
('<whale --> marine_animal>', 3) (3, 1, (1.0, 0.283107), [3, 2, 1])
i=3: animal isa whale. confidence=0.28223
('<animal --> whale>', 'eternal') (2, 1, (1.0, 0.28223), [2, 1])
i=4: whale isa animal. confidence=0.28223
('<whale --> animal>', 'eternal') (2, 1, (1.0, 0.28223), [2, 1])
i=5: marine_animal isa whale. time=3 confidence=0.11296870400000003
('<marine_animal --> whale>', 3) (3, 1, (1.0, 0.220642), [3, 2, 1])
i=6: marine_animal live_in ocean. time=3 confidence=0.20132044800000004
('<(marine_animal * ocean) --> live_in>', 3) (3, 1, (1.0, 0.393204), [3, 2])
i=7: animal isa marine_animal. time=3 confidence=0.4608000000000001
('<animal --> marine_animal>', 3) (3, 1, (1.0, 0.9), [3])
i=8: whale are_exposed_to pollutant_p. time=4 confidence=0.13045568000000002
('<(whale * pollutant_p) --> are_exposed_to>', 4) (4, 1, (1.0, 0.203837), [4, 3, 2, 1])
i=9: animal are_exposed_to pollutant_p. time=4 confidence=0.4147200000000001
('<(animal * pollutant_p) --> are_exposed_to>', 4) (4, 1, (1.0, 0.648), [4, 3])
i=10: marine_animal are_exposed_to pollutant_p. time=4 confidence=0.5760000000000002
('<(marine_animal * pollutant_p) --> are_exposed_to>', 4) (4, 1, (1.0, 0.9), [4])
i=11: pollutant_p increase the_risk_of_disease_z. time=5 confidence=0.7200000000000001
('<(pollutant_p * the_risk_of_disease_z) --> increase>', 5) (5, 1, (1.0, 0.9), [5])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment