jianyangg / local-llm

DSTA Internship Project
0 stars 0 forks source link

Store document data in Neo4j Graph Database #14

Closed jianyangg closed 1 week ago

jianyangg commented 2 weeks ago

Currently we are only using Neo4j's vectorstore. Explore storing the data as entities and relations

jianyangg commented 2 weeks ago

This repo teaches us how to load and extract data to and from Neo4j. Try to integrate this with the current project and obtain a visualisation of our custom dataset.

jianyangg commented 2 weeks ago

Seems like doing chain-of-thought (CoT) prompting helps the less (relative to ChatGPT) powerful llama3 llm extract key entities and relationships from the data provided.

  1. Extract entities from text (given as context)
  2. Extract relationships between entities (given as context from step 1) from text (given as context)
  3. Generate cypher queries from extracted entities and relationships. Text is once again given as context for summaries / additional metadata to be extracted for each entity.
jianyangg commented 2 weeks ago

Tldr; Instead of using one long, precise prompt, consider breaking the prompting into multiple steps such that the LLM can focus on individual components before putting them together into a more accurate and meaningful answer.