5 ms·
Would you mind detailing out the step of "forward the JSON to an LLM" - as I have a tangentially similar thing I'd like to solve, but I don't know how to do tha
by samstave 3y ago
Would you mind detailing out the step of "forward the JSON to an LLM" - as I have a tangentially similar thing I'd like to solve, but I don't know how to do that step - or point me at whatever helped you to learn that step.
- ailef 3y agoYou write a text containing the JSON with all the data and instructions on how to analyze it and you instruct the LLM to extract what you're looking for (the "prompt"). The easiest way to start is probably the OpenAI API, or you can try one of the self-hosted LLM although I've never interacted with them programmatically.
- oliverluk 3y agoThe process described by "ailef" is exactly what I have in mind. I manually tried the following prompt (which surely has a lot of room for improvement) in ChatGPT (GPT 4.0) with a few examples and got exactly what I needed. Prompt: Disambiguate the initials of "X Y Lastname" based on the following JSON input. Do not conduct a web search. Return the full name and the link to the reference as a JSON object with the keys "first_name", "last_name", "link_to_reference". Return "not found" in case you are not able to disambiguate the initials. Do not return anything else. JSON input: [the array scoped under the key "organic_results" of the JSON object SerpApi returns when searching for "{author_last_name_with_initials} full name {institute_name}" using Google]