Step 1 — Raw Text

Input:

text id="jlwm2l" Ravi lives in a sunny village in India. He has seven bright fish in a small pond. Every morning, Ravi feeds them rice. The seven fish swim fast and splash water. Ravi claps his hands and laughs. He loves his seven fish friends. They are all very happy and safe.

At this stage:


Step 2 — Sentence Splitting

Break text into sentences.

```text id=“jlwm3m” S1: Ravi lives in a sunny village in India.

S2: He has seven bright fish in a small pond.

S3: Every morning, Ravi feeds them rice.

S4: The seven fish swim fast and splash water.

S5: Ravi claps his hands and laughs.

S6: He loves his seven fish friends.

S7: They are all very happy and safe.


Why?

Because reasoning becomes easier sentence-by-sentence.

---

# Step 3 — Tokenization

Split into words/tokens.

Example:

```text id="jlwm4n"
Ravi | lives | in | a | sunny | village | in | India

Another:

text id="jlwm5o" The | seven | fish | swim | fast

Now system can process units individually.


Step 4 — POS Tagging

Find grammatical roles.

Example:

text id="jlwm6p" Ravi → proper noun lives → verb sunny → adjective village → noun India → proper noun

Another sentence:

text id="jlwm7q" fish → noun swim → verb fast → adverb

What happens here?

The system now knows:


Step 5 — Named Entity Recognition (NER)

Find important real-world entities.

Detected:

text id="jlwm8r" Ravi → PERSON India → COUNTRY

Possible additional semantic entities:

text id="jlwm9s" village → LOCATION pond → PLACE fish → ANIMAL

Now words become typed entities.


Step 6 — Coreference Resolution

Resolve pronouns.

Example:

text id="’wini0t" He → Ravi them → fish They → fish

Without this:

text id="’wini1u" He them they

would remain disconnected fragments.

Now all references merge into same entities.


Step 7 — Dependency Parsing

Find grammatical relationships.

Example:

Sentence:

text id="’wini2v" Ravi feeds them rice.

Parse:

text id="’wini3w" Ravi → subject → feeds feeds → object → fish feeds → instrument/food → rice

Another:

text id="’wini4x" fish → subject → swim fish → subject → splash

Now the system understands: WHO does WHAT.


Step 8 — Entity Extraction

Create nodes.

Entities found:

text id="’wini5y" Ravi Village India Fish Pond Rice Water Morning

Each becomes a graph node.


Step 9 — Property Extraction

Extract descriptions/attributes.

From text:

text id="’wini6z" sunny village small pond bright fish happy fish safe fish

Properties:

```text id=“’wini7a” Village: weather = sunny

Pond: size = small

Fish: brightness = bright emotion = happy safety = safe count = 7


Now entities gain semantic metadata.

---

# Step 10 — Relation Extraction

Convert actions into graph edges.

---

## Sentence 1

```text id="’wini8b"
Ravi lives in village
Village in India

Relations:

text id="’wini9c" Ravi → lives_in → Village Village → located_in → India


Sentence 2

text id="’wini0d" Ravi has fish Fish in pond

Relations:

text id="’wini1e" Ravi → owns → Fish Fish → located_in → Pond


Sentence 3

text id="’wini2f" Ravi feeds fish rice

Relations:

text id="’wini3g" Ravi → feeds → Fish Ravi → feeds_with → Rice


Sentence 4

text id="’wini4h" Fish swim Fish splash water

Relations:

text id="’wini5i" Fish → swims_in → Pond Fish → splashes → Water


Sentence 5

text id="’wini6j" Ravi claps Ravi laughs

Relations:

text id="’wini7k" Ravi → performs → clap Ravi → performs → laugh


Sentence 6

text id="’wini8l" Ravi loves fish

Relation:

text id="’wini9m" Ravi → loves → Fish


Step 11 — Build Knowledge Graph

Now combine everything.


Nodes

text id="’wini0n" Ravi Fish Village India Pond Rice Water Morning


Edges

```text id=“’wini1o” Ravi → lives_in → Village Village → located_in → India

Ravi → owns → Fish Fish → located_in → Pond

Ravi → feeds → Fish Ravi → feeds_with → Rice

Fish → swims_in → Pond Fish → splashes → Water

Ravi → loves → Fish


---

# Properties

```text id="’wini2p"
Fish:
  count = 7
  state = happy
  state = safe
  appearance = bright

Village:
  weather = sunny

Pond:
  size = small

Now meaning becomes structured.


Step 12 — Semantic Inference

Now the graph can reason.


Inference 1

Known:

text id="’wini3q" Fish → animal Animals → living

Infer:

text id="’wini4r" Fish → living


Inference 2

Known:

text id="’wini5s" Ravi feeds fish Ravi loves fish

Infer:

text id="’wini6t" Ravi → cares_for → Fish


Inference 3

Known:

text id="’wini7u" Fish swim

Infer:

text id="’wini8v" Fish → movable


Step 13 — Higher-Level Understanding

Now the system can summarize meaning.

Example abstract understanding:

text id="’wini9w" Ravi is a caring person who lives in India and takes care of seven fish.

This meaning never appeared literally. It was inferred.


Step 14 — Querying the Graph

Now questions become easy.


Question

text id="’wini0x" Who feeds the fish?

Graph lookup:

text id="’wini1y" Ravi → feeds → Fish

Answer:

text id="’wini2z" Ravi


Question

text id="մբույն3a" Where do fish live?

Lookup:

text id="մբույն4b" Fish → located_in → Pond

Answer:

text id="մբույն5c" pond


Final Result

Raw text became:

text id="մբույն6d" entities + properties + relations + inferred knowledge + queryable memory

That is the foundation of: