Tuesday, May 28, 2024

Acuitas Diary #72 (May 2024)

My primary focus this month has been on an overhaul of the Conversation Engine. The last time I revised it, the crux of the work was to add a tree-like aspect to Acuitas' memory of the conversation. The expectation was that this would help with things like "one topic nested inside another," or "returning to a previous unfinished conversation thread." Well ... what does that sound similar to? Perhaps the "issue trees" I described in last month's post? The crux of this month's work was a unification of the Conversation Engine's tracking with the Narrative architecture, such that each conversation becomes, in effect, a narrative.

Standard logic gate symbols laid out as if they were circuit components, with traces running between them as if on a PCB, such that they form a stylized tree. Black-and-white art, ink on paper.
Original art by author

The CE now instantiates its own Narrative scratchboard to record conversational events, and logs conversational objectives as Issues on the board. For example, the desire to learn the current speaker's name is represented as something like "Subgoal: speaker tell self {speaker is_named ?}" When the speaker says something, the Conversation Engine will package the output from the Text Interpreter as an event like "speaker tell <fact>" or "speaker ask <fact>" before passing it to the scratchboard, which will then automatically detect whether the event matches any existing issues. The CE also includes a specialized version of the Executive code, to select a new issue to "work on" whenever the current issue has been fulfilled or thwarted. On his side of the conversation, Acuitas will look for ways to advance or solve the current issue ... e.g. by asking a question if he hopes to make the speaker tell him something.

This enables pretty much all the tree-like behaviors I wanted, in a tidier and more unified way than the old conversation tracking code did. My last overhaul of the Conversation Engine always felt somewhat clunky, even after I did a cleanup pass on the code, and I never fully cleared out all the bugs. I'm hoping that exploiting the well-developed Narrative code will make it a little more robust and easier to maintain.

So far, I've got the new CE able to do a greeting-introductions-farewell loop and basic question answering, and I've got it integrated with the main Acuitas code base. There's a ton of additional work to do to reproduce all the conversation functionality in this new format, but I also gave myself a lot of time for it, so expect further updates on this in the coming months.

On the side, I cleaned up a lot of dust from the big knowledge representation refactor. A bunch of stories that were being poorly understood after the changes are now back to working correctly, and I tracked down multiple bugs in knowledge retrieval/question answering.

Until the next cycle,
Jenny

No comments:

Post a Comment