The local machine is very old, but that is fine, it can execute each gramps query at the expected speed of this old machine.
I the model usually does select the correct tools, and it also says what kind of tools might be missing. That is, A reply once had:
“Sorry I can not search for a family this person is a parent in.” Or “I don’t have access it know how to access that information”
Sometimes it is hallucinating responses and comes up with people that are not even in the database!
We should probably extend the descriptions of each individual tool to explain what all the nitty gritty details and fields in a person response mean to act upon that.
Hi @dsblank finally managed to add a “find_people” tool, so that we can search on people by name in the database.
I needed to also restrict the AI Model from looping, and added a final prompt after a few tries, not providing any tools anymore, to force an answer from the local running modal.
You might want to try out or just look at some of the code updates:
True about small trees. When a tree contains tens or hundreds of thousands people this won’t perform.
Also notice the summarization of the results with “desired fields”
As I found that even a result on a lastname with about 25 matching people, resulted in a huge json addition to the context window of the chat history, so we have to be careful, especially with local smaller models.
That subroutine seems to ignore some of the common name options. Will it make the chatbot too formal to recognize all the possibilities?
For instance, when searching for people who colaborate online, I might only recall their online name. So if I search a Gramps tree for kku, I’d want to find Kari Kujansuu. Some people haven’t shared their personal names. For instance, I only know CallMeDave (on the Gramps Reddit and the wiki) by that name.
Have tried the routine to search on a lot of name options, but then limit the output to the common names.
I’m a bit surprised that you mention to want to find nicknames? Usually the genealogy tree that is being searched by the tool has “real names”, maybe I’m misunderstanding the concern, or I might indeed have missed an important name field like alternate names to be found.
Other then that: when playing with the tools, also tried several small AI models, and some of those have a hard time understanding the tooling provided. That is, not all models understand when to provide the appropriate arguments for tools, it get into indefinite loops, so the mayor changes are also in the final decision: not providing the tools and force the model to provide an answer.