Urgent.News

What's breaking now, across thousands of outlets.

Tech

Quantified Self: Transform Your Medical PDFs into a Personal Health Oracle with RAG & PubMed

Have you ever looked at a 10-page medical lab report and felt like you were reading ancient hieroglyphics? You’re not alone. In the era of the Quantified Self , we are collecting more health data than ever, yet most of it sits rotting in unstructured PDF files. In this tutorial, we are going to build a Medical RAG (Retrieval-Augmented Generation) system . We will use Unstructured.io to parse…

In the era of the Quantified Self, individuals collect an increasing amount of health data, often stored in unstructured PDF files. This tutorial aims to build a Medical RAG (Retrieval-Augmented Generation) system that parses these complex medical reports and links personal data with real-time clinical research from the PubMed API.

To achieve this, the system utilizes Unstructured.io for parsing medical PDFs, Pinecone as a high-performance Vector Database, and LangChain to orchestrate a dual-retrieval strategy. The architecture combines personal data with global knowledge to provide accurate and relevant health insights.

The process begins with parsing messy medical PDFs using the `unstructured.partition.pdf.partition_pdf` function. Clean content is extracted, and a vector store is created using Pinecone and OpenAI embeddings. The vector store allows for semantic searches, enabling the system to find relevant information even if the query is phrased differently.

When a user query is received, the system retrieves personal health records from Pinecone and conducts a PubMed API search for clinical papers related to the query. The retrieved information is then used to generate a response that combines personal context with clinical research. The final response is provided by a LangChain chain that utilizes the GPT-4o model for medical reasoning and action.

By following this pipeline, users can transform their medical PDFs into a personal health oracle, gaining actionable insights and ensuring they consult professionals if necessary.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Measuring Order Book vs AMM Share on the XRP Ledger

When the AMM amendment activated on the XRP Ledger in 2024, the expectation was that liquidity would migrate into pools the way it did on every smart-contract chain before it.

  • 88.2% of trade activity occurs on the XRP Ledger's order book.
  • AMM volume has larger number of trades but smaller average trade size.
  • Order book's central limit order book remains viable due to low canceling costs.

A Debugging Mindset That Actually Works

Most debugging advice is a list of tools. console.log , breakpoints, strace . Tools matter, but the thing that actually cuts my debugging time in half is a mindset: treat every bug as a wrong belief…

  • View bugs as flawed beliefs, not broken systems
  • Document expected vs actual outcomes and code behavior
  • Apply binary search to isolate bugs in code sections

Automatically Deploy Your App to a VPS with GitHub Actions

If your deploy process is "SSH into the server, cd to the app, git pull , restart something, hope" — this post replaces it with git push .

  • GitHub Actions automates VPS deployment via GitHub push
  • Requires app in GitHub repo, SSH-accessible VPS, dedicated deploy user
  • Store private SSH key as GitHub repository secret

More from Friday 11 September →