Retina-agent is an exploratory workflow for building a retina-focused literature assistant from public biomedical articles. The repository contains notebooks and supporting files for downloading open-access PubMed Central articles, preparing training/evaluation data, testing JSONL formatting, and experimenting with local Ollama/LLaMA-Factory model workflows.
NCBI_paperdownload.Rmd # Download and process open-access PMC articles
Prepare_for_Ollama.Rmd # Notes for building a local Ollama model
debug.Rmd # JSONL and dataset registration checks
Model_test/yang_model/ # Ollama Modelfile used in local experiments
report/ # Slide/report artifacts from model experiments
- Programmatic retrieval of open-access biomedical literature from NCBI/PMC.
- Dataset preparation for retina-domain language-model experiments.
- Local model experimentation with Ollama and LLaMA-Factory style data layouts.
- Practical debugging checks for ShareGPT-style JSONL training data.
The notebooks include paths from the original HPC and local analysis environment. Before rerunning the workflow, update those paths to match your own project directory, conda environment, NCBI API key setup, and model-output location.
Recommended local structure:
papers_retina/
pdf/
xml/
metadata/
data/
enhanced_llama3_retina_training_sharegpt.jsonl
- Use
NCBI_paperdownload.Rmdto search PMC and download open-access retina literature. - Convert article text and metadata into the desired training/evaluation JSONL format.
- Run the checks in
debug.Rmdbefore registering the dataset with a local training framework. - Use
Prepare_for_Ollama.RmdandModel_test/yang_model/Modelfilefor local Ollama experiments.
Only open-access articles should be downloaded and reused. Keep API keys, private datasets, and large generated model artifacts outside the repository.