This project generate impression based on the provided procedure name and findings of a radiology report. The framework consists of three specialized agents:
- Report retriever: a retrieval agent that searches for similar reports from an external database.
- Radiologist: a generation agent that utilizes LLMs to generate or update the impression.
- Reviewer: a review agent that assesses the consistency between the generated impression and provided findings.
- LLM: Deployed using Ollama. In the main code,
llama3:70b
is used. - RAG: pip install langchain langchain-community sentence_transformers faiss-cpu -U langchain-huggingface
- Evaluation: pip install nltk sacrebleu rouge-score bert-score
The input file required for the main code is not provided in this repository. The file includes the following columns:
- ID: Index
- ACC: accession number
- modality: modality used for the imaging study
- ProcedureNM: procedure name
- FINDINGS: findings section
- IMPRESSION_CLEAN: cleaned impression section
Notes: ACC and modality are used as metadata in the vector database. However, they are not essential for generating the impression. If desired, the code can be modified to exclude these columns.