## Problem Statement:

Large Language Models (LLMs) like ChatGPT, Claude, and Gemini, as well as open-source models like LLAMA 3, 3.1, and Mixtral, have limitations in biomedical research, personal health, genetics, and longevity research. This is due to:

- **Lack of specialized knowledge:** LLMs aren't trained on in-depth biological data.
- **Lack of knowledge of existing gene and gene-products databases.**
- **Poor referencing:** Despite recent improvements, LLMs still struggle to cite reliable sources.
- **"Hallucinations":** LLMs can invent false details, especially in complex areas.
- **Unreliable tool calls and small context windows on open-source models** (i.e., LLAMA 3.1).

Lifespan intervention information and partial reprogramming results are precious for longevity research but are not known by existing LLMs. This requires a targeted retrieval strategy to extract and process the relevant data from currently unstructured sources. 

Some commercial projects try to address specific aspects of these problems. However, more open-source solutions, developed by and for researchers and citizen scientists, are needed.

The Longevity Genie project tackles the limitations of LLMs in health and longevity research by utilizing the following techniques and approaches:

- **Incorporating up-to-date information:** The project utilizes Retrieval-Augmented Generation (RAG) and Hybrid Search, utilizing vector-based and keyword-based queries to expand LLMs' knowledge with high-quality, reliable sources, ensuring accurate and comprehensive information retrieval.
- **Domain-Specific Focus:** The project indexes pre-selected scientific papers emphasizing longevity research to provide targeted and relevant insights. Queries to specialized databases are used to supplement answers with relevant facts.
- **Agent-Based Approach:** Specialized agents are developed to refine how LLMs query, use, and structure domain-specific information, resulting in improved and more precise scientific responses.
- **Collaborative Origins:** Initiated at the Zuzalu hackathon, the project has received support and contributions from VitaDao, HEALES, and Rostock University, fostering a collaborative effort in advancing LLM capabilities in health and longevity research.

## Current Solution and Progress:

The project currently features the following (See Project Description for full details and links):

- **Custom Assistants:** The Genetics Genie custom assistant supports multiple models, providing specialized knowledge in genetics and clinical trials.
- **Custom GPTs:** Several custom GPTs have been developed, each utilizing different databases and hybrid search techniques.
- **Aging-Related Papers Datasets:** Hosted on [Hugging Face](https://huggingface.co/longevity-genie) to support and enhance research and development in the field. We have implemented scientific indexing using OpenSearch and bge-large embedding which requires refactoring.
- **Infrastructure libraries** to deal with open-source agents ([just-agents](https://github.com/longevity-genie/just-agents/)) and research papers (indexpaper, getpaper) in the Longevity Genie GitHub organization.

## Proposed Solution Improvements:

The project currently relies on the proprietary OpenAI API and technologies, which, while producing high-quality output, are limited in availability and raise privacy concerns. However, the recent open-source advancements, particularly the release of LLAMA-3.1, have bridged the gap between commercial and open-source models. This offers an opportunity to break free from proprietary dependencies, enabling fully open and on-premise deployment while maintaining high-quality output.

Further expansion of biomedical databases and sources available to the model through RAG highlights the need for inter-domain knowledge about bio-object links and interconnections to improve model reasoning. Integrating biomedical knowledge graphs (KG) with large language models (LLMs) through open-source projects like [Biocypher/Biochatter](https://github.com/biocypher) and [KG_RAG](https://github.com/BaranziniLab/KG_RAG) holds promise for such improvements.

To expedite longevity research, systematization and organization of existing and novel information about partial reprogramming techniques, interventions, and drug-interactions would be valuable. Extracting such information requires a combined approach using agent-chains, custom-tailored prompts, and multi-modal LLM calls to interpret scientific article figures for advanced reasoning.

## Roadmap:

- **Phase 1, Q3 2024 - Q4 2025:**
  - Refine prompts and code to support newly added open-source models to achieve the level of output quality on par with proprietary models.
  - Add BioCypher format support and KG-RAG capabilities.
  - Reimplement indexing of scientific papers with semantic segmentation (which splits articles by meaning and not by length).

- **Phase 2 (Q4 2024 - Q1 2025):**
  - Reindex scientific papers with more advanced embeddings.
  - Introduce available BioCypher graphs (Drug-Interactions, CKG) for retrieval.
  - Add multimodal queries to enhance RAG results with textual transcription of scientific papers figures.
  - Introduce capabilities to organize unstructured reprogramming techniques and protocols into tables.

- **Phase 3 (Q1 2025 - Q2 2025):**
  - Conduct internal and controlled user group testing.
  - Optimize performance and quality based on user feedback.
