From 0 to 1: Use large AI models to build a console knowledge question and answer system to unlock the secrets of "Journey to the West"

(0 comments)

Recently, the release of "Black Myth: Wukong" has become a hit all over the Internet, and the short video platform has been almost submerged. I also have a gaming computer for this and the controller is on the way. When watching the promotional video, I couldn't help but wonder: Why can't Sun Wukong, who holds the golden cudgel, defeat the Erlang God Yang Jian? In fact, there are still many questions about "Journey to the West" on the Internet.

In this 21st century where information is exploding, we have a more efficient way to read and understand "Journey to the West", and that is with the help of large-scale AI models. The GOM-4-long general large model released by Zhipu AI can handle long texts with a length of up to 1 million, and the number of words in "Journey to the West" is about 870,000, which is very suitable for such experiments.

Limitations of previous knowledge base question answering systems

When I was working on a knowledge base Q&A system in the past, because the text processing length of early large-scale models was not long enough, I needed to use vector storage middleware to build a knowledge base to implement data retrieval. Assembling the entire set of components is relatively cumbersome.

Advantages and steps of building a console Q&A application using GOM-4-long

Now, with GOM-4 long, large models, we can completely move away from knowledge bases and vector storage. We can implement a console Q&A application with just a few lines of code. By running the main method directly, we can experience AI locally. Knowledge conversations are very efficient. The specific steps are as follows: 1. Register, log in and obtain the key : Go to the Zhipu AI website, register and log in to get free points. Click on the console, no need to change other settings, just click on the API key, name it and generate the key. 2. Add dependencies : Click on the development document, find the interface document, and select a familiar language. For example, Java players can copy the maven dependencies and paste them into the project's pom.xml file. 3. Create a new test class and write the code : Create a new test class, write the main method, search for the test code written by Zhipu Java experts, copy a section and put it in the main method, and then replace it with your own API password key. 4. Add interaction logic : Use Zhipujia's COGX AI code plug-in to write the interaction logic of the console, replace the original code, make slight modifications and click run to get the console version of the AI ​​dialogue. program.

Use AI to extract data from "Journey to the West" and answer questions

Next, we need to extract data from the "Journey to the West" PDF. Find a PDF parsing library, extract all the text in it, enter all the text of the original "Journey to the West" in the prompt word, and click to run. Even if the data is very long, it will not affect the response speed of large AI models. We can try to ask it a few questions: -Why Monkey King cannot defeat Erlang Shen : AI quickly gave a reply and summarized several reasons. Erlang Shen Yang Jian's seventy-three transformations and celestial eye allow him to take the initiative in the changing competition and can restrain Sun Wukong more effectively. -Why did Sun Wukong leave without doing anything after immobilizing the Seven Fairies : AI's answer is very pertinent. Sun Wukong learned about the existence of the Peach Festival from the Seven Fairies, but was not sure whether he was invited. At this time, he was anxious to go to Yaochi to inquire about the news, and had no other plans. - Describe the image of Sun Wukong : AI not only described the image of Sun Wukong, but also generated prompt words for the large model of the wisdom composition holy picture. Use Zhipu Qingyan's AI drawing function to fill in the prompt text, and the generated pictures will faithfully reflect the original author's description.

Free activation and application suggestions for GOM-4-flash

At the same time as this video was produced, the Zhipu Large Model Open Platform provided another sub-model GOM-4-flash for free. This is Zhipu AI’s first free large model API. Calls and tweaks are free. This is good news for small companies or individual developers and entrepreneurs who have lightweight fine-tuning needs. You can choose GOM-4-long or GOM-4-flash for configuration according to your needs.

In short, through this simple console question and answer program, we can not only deeply explore the mysteries of "Journey to the West", but also apply it to papers, journals, wikis of internal knowledge bases, and even e-books. If you have any comments or suggestions about this Q&A system, please leave a message in the comment area to share!

Currently unrated

Comments


There are currently no comments

Please log in before commenting: Log in

Recent Posts

Archive

2025
2024
2023
2022
2021
2020

Categories

Tags

Authors

Feeds

RSS / Atom