Skip to content

Guide for working with LLMs in JuliaHealth #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ makedocs(;
assets = String[],
),
pages = ["Home" => "index.md",
"Workflow Guides" => ["observational_template_workflow.md"],
"Workflow Guides" => ["observational_template_workflow.md", "llm_template_workflow.md"],
"API" => "api.md"],
# TODO: Update and configure doctests before next release
# TODO: Add doctests to testing suite
Expand Down
59 changes: 59 additions & 0 deletions docs/src/llm_template_workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# JuliaHealth LLM RAG Assisted Study

This workflow guide demonstrates how to initialize and configure your study using [HealthBase.jl](https://github.com/JuliaHealth/HealthBase.jl) with assistance by an LLM RAG architecture.

---

## 1. Setup and Study Initialization

First, ensure that the required packages are installed in your global Julia environment:

```julia
import Pkg
Pkg.add(
[
"DrWatson",
"HealthBase"
]
)
```

> **Note**: The global environment is the default Julia package environment shared across projects.
> To learn more about environments, see the [Pkg documentation](https://pkgdocs.julialang.org/v1/environments/).

Then, load the packages:

```julia
using DrWatson
using HealthBase

import HealthBase:
configdir,
corpusdir,
modelsdir
```

Initialize a new study:

```julia
julia> initialize_study("sample_study", "Rosalind Franklin"; template = :llm)
```

This command creates a new directory called `sample_study` using the `:llm` template.
Then, it activates a new Julia environment named `sample_study`.

After initializing the study directory and Julia environment, install the remaining required packages:

```julia
Pkg.add(
[
"DataFrames",
"Downloads",
"DBInterface",
"DuckDB",
"FunSQL",
"OHDSIAPI",
"OHDSICohortExpressions"
]
)
```
Loading