Hub
Pricing About
WorkflowWorkflow

Ollama - Extract Information from PDF Bank Statements into JSON

PdfLlmVectorStoreLlama3
+9
mlauber71 profile image
Draft Latest edits on 
Aug 24, 2024 9:04 AM
Drag & drop
Like
Download workflow
Workflow preview
Extract Data from Bank Statements (PDF) into JSON files with the help of Ollama / Llama3 LLM
- list PDFs or other documents (csv, txt, log) from your drive that roughly have a similar layout and you expect an LLM to be able to extract data
- formulate a concise prompt (and instruction) and try to force the LLM to give back a JSON file with always the same structure (Mistral seems to be very good at that)
- convert the single document to a Vector Store either into  Chroma or Meta's FAISS with the helop of Ollama and a suitable embedding model (mxbai-embed-large)
- Use Ollama wrapper (via Python and KNIME node) to put document and query before the LLM
- collect the data back from Python into KNIME
- extract the data from JSON files, either with the help of Regex or just convert the JSON with KKNIME nodes
- make sure they have the same structure

=> you need to have Python environment installed and Ollama and you need to have the models pulled locally and Ollama running!!!
If you experience problems with the model download: Check your Proxy settings and then kill all running Ollama jobs in your task manager and try again
------
Run in Terminal window to start Ollama. You can also try and use other models (https://ollama.com). You can also just pull the model

ollama pull llama3:instruct
ollama run llama3:instruct

To get the embedding model you run this command in the terminal window

ollama pull mxbai-embed-large

Ollama and Llama3 - A Streamlit App to convert your files into local Vector Stores and chat with them using the latest LLMs
https://medium.com/p/c5340fcd6ad0

Medium - Chat with local Llama3 Model via Ollama in KNIME Analytics Platform - Also extract Logs into structured JSON Files
https://medium.com/p/aca61e4a690a




External resources

  • Medium: Llama3 and KNIME — Build your local Vector Store from PDFs and other Documents
  • KNIME and Ollama - description of this workflow - KNIME Forum (80875)
  • Download the whole LLM workflow group in order to get the folder
  • KNIME Spaces: KNIME for Generative AI
  • GitHub - A Streamlit App to convert your files into Vector Stores and chat with them with LLMs
  • Medium - Chat with local Llama3 Model via Ollama in KNIME Analytics Platform - Also extract Logs into structured JSON Files
  • Medium - Ollama and Llama3 - A Streamlit App to convert your files into local Vector Stores and chat with them using the latest LLMs
Loading deploymentsLoading ad hoc jobs

Used extensions & nodes

Created with KNIME Analytics Platform version 4.7.8 Note: Not all extensions may be displayed.
  • Go to item
    KNIME Base nodesTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.7.8

    knime
  • Go to item
    KNIME Conda IntegrationTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.7.0

    knime
  • Go to item
    KNIME ExpressionsTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.7.3

    knime
  • Go to item
    KNIME JavasnippetTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.7.0

    knime
  • Go to item
    KNIME JSON-ProcessingTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.7.0

    knime
  • Go to item
    KNIME Math Expression (JEP)Trusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.7.0

    knime
  • Go to item
    KNIME Python IntegrationTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.7.3

    knime
  • Go to item
    KNIME Quick FormsTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.7.4

    knime
  • Go to item
    Palladian for KNIMEUnknown extension

    This is an unpublished or unknown extension.

    palladian.ws

    Version 3.0.0

Legal

By using or downloading the workflow, you agree to our terms and conditions.

KNIME
Open for Innovation

KNIME AG
Talacker 50
8001 Zurich, Switzerland
  • Software
  • Getting started
  • Documentation
  • Courses + Certification
  • Solutions
  • KNIME Hub
  • KNIME Forum
  • Blog
  • Events
  • Partner
  • Developers
  • KNIME Home
  • Careers
  • Contact us
Download KNIME Analytics Platform Read more about KNIME Business Hub
© 2025 KNIME AG. All rights reserved.
  • Trademarks
  • Imprint
  • Privacy
  • Terms & Conditions
  • Data Processing Agreement
  • Credits