kennethleungty / Llama-2-Open-Source-LLM-CPU-Inference

Running Llama 2 and other Open-Source LLMs on CPU Inference Locally for Document Q&A
https://towardsdatascience.com/running-llama-2-on-cpu-inference-for-document-q-a-3d636037a3d8
MIT License
950 stars 212 forks source link

how to change data files? #19

Closed Janeyanhong closed 1 year ago

Janeyanhong commented 1 year ago

first time I run the main program successfully, then I try to change the data file to be my own pdf file and ask related questions.

But results always look like based on the original one.

results:

D:\Llama-2-Open-Source-LLM-CPU-Inference>python main.py "how many years of experience in banking technology practitioners"

Answer: Mr. Woodward has 16 years of experience in banking and finance, including 9 years as a senior investment banker within J.P . Morgan’s international mergers and acquisitions team and 7 years in various senior finance roles at Ladbrokes.

Source Document 1

Source Text: worked as a senior investment banker within J.P . Morgan’s international mergers and acquisitions teambetween 1999 and 2005. Prior to joining J.P . Morgan, Mr. Woodward worked for PricewaterhouseCoopersLLP in the Accounting and Tax advisory department between 1993 and 1999. He received a Bachelor ofScience degree in physics from Bristol University in 1993 and qualified for his Chartered Accountancyin 1996. Document Name: data\manu-20f-2022-09-24.pdf Page Number: 87

in fact the file is data/resume_cn1_en.pdf.

How can I handle this issue?

Janeyanhong commented 1 year ago

fixed it already, by running db_build.py to reload the changed file.

kennethleungty commented 1 year ago

Hi Jane, looks like you have indeed fixed it. Yeah rerunning db_build.py on the new documents is the way to go