Feeding a Personal AI with TW

Has anyone built(trained) an AI knowledge base locally by feeding a TW into it?

Any details on the process?

I’m not sure exactly what you are trying to achieve, but “Feeding a TW” would not be enough data to train a model.

Hey Rich,

Do you mean more of a RAG implementation using AI (Retrieve Augmented Generation) ? This is where you get a pre-built large language model to digest a bunch of local content to create a database that you can then query with natural language.

I’m considering this:

[ext[之后AI功能在太记里更新 | 太微中文论坛]]

I plan to add the following features to both the mobile and desktop versions of Tidgi:

  1. Unified search across all workspaces: If the wiki is active, users can directly use the filter for searching. If the wiki is in a dormant state and not started, the search will be conducted through string matching in the file system. This can be used by users and for AI RAG as well.
  2. A chat interface: It allows setting the AI to run in the background, and enables free reading and writing of wikis (it’s possible to set which wikis each agent can access and which tiddlers under specific filters they can read and write).

This way, the AI can comment on notes. When I’m slacking off, the AI can remind me that there are many interesting ideas that were only proposed but never implemented. It can also start discussions on certain ideas, thus promoting thinking (similar to spaced repetition, but while repeating, it also discusses with you).

The reason I don’t develop this as a TiddlyWiki plugin is as follows: Firstly, this approach allows leveraging knowledge from multiple wikis to discuss issues. Secondly, much of the AI’s chat content is disposable and not reviewed later. I’ll store these in a dedicated SQLite database for AI memory to avoid over - contaminating my daily - used wiki. The same goes for the AI’s comments on tiddlers; they won’t be saved in my own wiki to prevent having more AI content than human - generated content in my wiki. Thirdly, the core updates of Taiwei are rather cautious, and it’s too slow to modify the AI Tools plugin of Taiwei through a PR. It’s faster to develop independently.

  • For ordinary users: They rarely engage in agent development and only use the features. They don’t like to tinker.
    • Therefore, instead of a visual node editor like UE Blueprint, we use JavaScript for writing. And the AI can assist advanced users in writing scripts.
    • Provide preset functions that retrieve parameters from environment variables instead of directly passing parameters in the code. Ordinary users can adjust parameters through forms.
  • JavaScript - written processes: These cover randomly selecting an online wiki and executing a filter to randomly retrieve notes, conducting RAG from multiple wikis, crafting personality prompts, crafting prompts for the AI to output in a specific format, parsing the format to get results, writing to SQLite, and adding source spectra.
    • It can also be AI - free. For example, automatically find notes with specific tags, send them to the Mastodon micro - blog through the API, and then add the micro - blog URI to the tiddler to indicate it has been published.
  • Develop a Tidgi-AI Tiddlywiki plugin: Provide widgets to load content from SQLite, such as loading the AI’s comments on the current tiddler.
1 Like

Yes, this has been done – see WikiSage and Expanded ChatGPT Plugin

I mean the

part in WikiSage -- Your Tiddlywiki AI Companion - #35 by linonetwo


Oh, sorry, I thought you were replying me.