File size: 1,809 Bytes
03e863f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# RAG Knowledge Base

Drop your own neuroscience knowledge files here to improve LLM interpretations.

## Supported formats

### JSON files (`*.json`)

Each JSON file should be a flat object mapping region names to descriptions:

```json
{
    "Amygdala (AMY)": "The amygdala processes threat detection and fear conditioning. It receives rapid subcortical visual input via the superior colliculus and pulvinar for fast threat assessment...",
    "Hippocampal Formation (HPF)": "The hippocampus is essential for episodic memory encoding and spatial navigation. Place cells in CA1 fire at specific locations..."
}
```

Region names do not need to match the Allen atlas names exactly -- the system uses semantic similarity (embedding search) to find the most relevant knowledge for any query.

### Text files (`*.txt`)

Use `## Region Name` headers to separate entries:

```
## Amygdala (AMY)
The amygdala processes threat detection and fear conditioning...

## Hippocampal Formation (HPF)
The hippocampus is essential for episodic memory encoding...
```

## Partial coverage is fine

You do not need to cover every brain region. The system merges your files with a built-in fallback knowledge base (21 regions). For any region not covered by your files or the fallback, the LLM uses its own training knowledge.

Priority order:
1. Your files in this directory (highest priority)
2. Built-in fallback knowledge base (`REGION_KNOWLEDGE` in `src/region_analyzer.py`)
3. LLM's own neuroscience training knowledge

## Tips

- More detail is better -- include connectivity, cell types, clinical relevance
- Multiple JSON/TXT files are merged automatically
- If two files define the same region, the last one loaded (alphabetical order) wins
- Changes take effect on the next app startup (no need to rebuild anything)