Early RISC OS Generative AI access
Pages: 1 2
Paolo Fabio Zaino (28) 1882 posts |
To everyone interested, Over the past couple of years, alongside the many other things I have been doing for or with RISC OS, I have been working on preparing training data and embeddings to develop a Generative AI tool aimed at helping people new to RISC OS. The first version is now ready for those who would like early access and can assist in improving the GPT. This tool is designed for general users and can help with learning how to use, configure, and more within RISC OS. A key feature is that it effectively translates RISC OS documentation and training materials into several spoken languages, such as Italian, French, German, Japanese, Spanish, and more, making RISC OS more accessible than ever before. However, AI is not truly “intelligent” (the “I” in AI is just a myth, often spread by those seeking investment), so for it to work reasonably well, I need to embed questions in multiple formats, with plausible answers and extended documentation to enhance response quality. Thus, I am seeking assistance from people with some familiarity with RISC OS and, ideally, knowledge of languages beyond English (but this is not a requirement) to ask RISC OS User Assistant questions and let me know if the answers are wrong. It’s not a complicated job, and can be done even having just 5 minutes of spare time. If you are interested, please send me an email, and I will provide you with access to the system for testing and improvement. Once the main User Guide Assistant is released, I have three additional projects in progress: - RISC OS ObjASM Assistant: This will help users learn ObjASM programming, understand RISC OS source code, and even translate RISC OS sources to C. - RISC OS BBC BASIC Assistant: This assistant is designed to help users learn BBC BASIC on RISC OS, understand BBC BASIC programs, and debug their own code. - RISC OS C Assistant: This tool will aid users in learning to write C programs on RISC OS, read C code, and debug their own projects. You can contact me privately using this link: https://paolozaino.wordpress.com/contact/ Thanks in advance to who’ll wolunteer to help. Please note 1: As mentioned above, AI is not intelligent, sentient, or capable of reasoning. It’s just a handy tool for finding answers. The more training data it has, the better the responses can be, but with current neural network technology, there are limitations! So, please do not trust the AI or use AI-generated code blindly. Please note 2: This project, like all my other work for or with RISC OS, will be available to everyone for free. It will also include training data for Arthur, RISC OS 2, RISC OS 3.xy, RISC OS 4, and (of course) RISC OS 5.xy, to support both the RISC OS 5 community and the retro community. This continues my mission to make RISC OS fun and accessible to everyone. Please note 3: If you just want to have early access to write early complaints about it, please refrain! You’ll have plenty of time to complain when it’s officially released. Thank you :) |
David J. Ruck (33) 1635 posts |
I had hoped RISC OS would remain gloriously unencumbered by statistical guessing machines. |
Dave Higton (1515) 3525 posts |
Me too. It will be a long time before “AI” starts to show any sign of intelligence. As of now, it is prone to hallucinations and gross errors. This means it is of little use. There are some niches where it has proved to be useful, but they are highly specialised, and trained on only good data. The generalised models are likely to be training on their own rubbish output. |
Andrew McCarthy (3688) 605 posts |
Julie’s original related post gave me a similar idea. If it provides any value, then this is good. As long as the limitations above are understood and the broader questionable ethics concerning the use and application of generative AI, centred around copyright infringement and permissions, are avoided, then great. |
GavinWraith (26) 1563 posts |
Of course “AI” is useful. The problem is not with the AI but the false expectations peddled by hype-merchants. Maths, and science in general, struggle beneath this burden, that its practitioners must be labelled as geniuses or warlocks. That they are ordinary people is too much for some to swallow. Somehow they must be cast as alien. |
Steve Pampling (1551) 8170 posts |
I tend to refer to it as A.S. (Artificial Stupidity) as “Intelligence” isn’t a feature. (As Paolo notes) A pattern matching and best guess system as Paolo outlines seems like a useful item – just make sure that no one tags it as AI. |
Rick Murray (539) 13839 posts |
Guys… as much as I would love to dump on “AI” as what’s currently being touted (LLMs) is a massive crock of [bleep!], I think there may be a certain benefit to having one that is trained to understand that RISC OS is a thing, and that BBC BASIC isn’t some weird dialect of Microsoft BASIC. I think Paolo’s mistake here is in titling this with the words generative AI, when it’s clear that we’re not the delusional believers who swallow the hype that extracts obscene amounts of money from venture capitalists and investors (need I point out what the SoftBank guy just said?). Instead, how about “try out an automated problem solver aimed at RISC OS”? Maybe, maybe, it might prove to be of some use. Or maybe not. But let’s call it a problem solver or solution finder or whatever and ditch the heavily abused term “AI”. Now, then, the important question: Does it work? ;) [and… Arthur… really?] |
Paolo Fabio Zaino (28) 1882 posts |
Guys can you please take your shenanigans to Aldershot? You’re derailing a topic that explains what “AI” means and what to expect from the project. This is here for those who want to help; others can simply ignore it. Thank you. As for RISC OS and AI, it’s clear you may not be aware that both Acorn and RISC OS have had AI-related projects for years. A famous job ad posted by Acorn many years ago sought developers and mathematicians who could work on AI for Acorn platforms (I still have a picture of that job ad somewhere). Neural Networks were developed by me and multiple other creators over the years (one, I believe, was by a British developer who published it in a Archimedes magazine at the time, I forgot his name, apologies to him). On top of that, Back in the 90s, I developed !Sylog for RISC OS, which could learn from Italian sentences (so, naturally, it didn’t reach broader audiences). Not to mention my port of Genann (done years ago now), which brings modern Neural Networks to RISC OS.
Indeed Steve, but unfortunately tags are out of our control. If it uses an LLM (which it does) it is classified as AI. So, there is very little we can do. I tend to separate the two as AI and GenAI (Generative AI), but the AI nonsense remains. It is what it is at this point. |
Stuart Swales (8827) 1357 posts |
I, for one, welcome code trained on sweary comments. |
Paolo Fabio Zaino (28) 1882 posts |
For the complainers, new topic in Aldershot just for you guys: https://www.riscosopen.org/forum/forums/12/topics/19563 |
Paolo Fabio Zaino (28) 1882 posts |
Rick asked:
Here is an example from the current release: Prompt: How do I use Wimp_PollIdle? Response: The `Wimp_PollIdle` SWI (`SWI &400E1`) in RISC OS is used to allow a task to "sleep" while awaiting an event, giving other tasks more processing time. It performs a function similar to `Wimp_Poll` but introduces a delay until either a specified time or an event occurs. ### How to Use `Wimp_PollIdle` 1. **Parameters on Entry**: - **R0**: Event mask, as used in `Wimp_Poll`, specifying which events should be detected. - **R1**: Pointer to a 256-byte block where event data will be returned. - **R2**: Earliest return time, in centiseconds since the system start time, for a `Null_Reason_Code` event. - **R3**: Optional pointer to a "poll word" if bit 22 in `R0` is set, used for high-priority polling. 2. **Return**: - The call will only return before the specified time if an event (e.g., user action or system request) occurs. Otherwise, it waits until the specified time has elapsed. - Upon return, the system will process the required event, if any, and return control to the calling task with data in the block pointed to by `R1`, formatted as per the event type【30:7†source】【31:11†source】【30:4†source】. 3. **Typical Use Case**: - `Wimp_PollIdle` is often used for background tasks such as a clock or periodic update. For instance, a clock application might specify a return time incrementally to update the display every second. 4. **Error Handling**: - If the Wimp is interrupted (e.g., user switches to command prompt), the time comparison should accommodate any delay. A typical structure in BASIC or assembly might involve reading the monotonic time and updating only when necessary: ```basic SYS "OS_ReadMonotonicTime" TO newtime WHILE (newtime - oldtime) > 0 oldtime = oldtime + 100 ENDWHILE REM Pass oldtime to Wimp_PollIdle ``` 5. **Considerations**: - Applications using `Wimp_PollIdle` should account for time wrap-around in the 32-bit time counter, which resets roughly every six weeks【30:16†source】【30:0†source】. Using `Wimp_PollIdle` effectively can optimize application performance, especially in environments where tasks do not need immediate updates and can yield time to other processes. To you to decide the quality so far, but it needs more improvements. Obviously the same question asked in a different language will trigger the response in that language, so French, Spanish, Italian etc. It also generate markdown documents that can be used to speed up the work done on the Wiki pages here (or on other similar tools), but again, remember AI makes mistakes, so it’ll ALWAYS require human supervision. |
Steve Pampling (1551) 8170 posts |
How do I use Wimp_PollIdle? Formatting of the reply could do with limiting to a more human line length. I know the content is important but if you don’t present it ‘right’ people tend to let their attention drift. |
Steve Fryatt (216) 2105 posts |
Formatting of the reply could do with limiting to a more human line length. Given that it looks like Markdown, I suspect the formatting is (not unreasonably) left as an exercise for whatever renders it into text for display. |
Paolo Fabio Zaino (28) 1882 posts |
Yes, it is Markdown and yes display depends on the renders. A browser will render it as regular web content (so also dynamically expandable etc.). As a side note, for people with not a good eye sight it can also read the content, it’s OpenAI afterall so has all the usual bits and bolts. For the coding Assistants: There will be at some point a RISC OS UI to get the code as text for copy and past, obviously that is “time allowing”, but it should already working fine in Iris and given that now Iris is available to everyone via DIrect, there should be no issues (again TBD) |
Steve Pampling (1551) 8170 posts |
Had that bit fixed1 thanks – but the reader is a useful feature. 1 Fancy eye tests using new kit I helped commission the week before Covid pushed my cataracts way over the edge, and surgery by surgeons I’d done work for in the months prior. |
Paolo Fabio Zaino (28) 1882 posts |
Glad to hear that, also don’t forget the the AI can generate whatever output format you want, here is the same question, this time also requesting the output to be in JSON format: prompt: How do I use Wimp_PollIdle? (please generate a JSON document for the response instead of a markdown and use ARM Assembly for the pseudo code example) response:
Different formats should also help people to generate more documentation. In this case the example is in pseudo Assembly (just for a change), but again there is still plenty of work to do before it can be released to everyone. |
Colin Ferris (399) 1813 posts |
Hmm Patterns – I wonder if AI could run through ARM code and recognize loops etc and produce ‘C’ code? |
Stuart Swales (8827) 1357 posts |
FFS |
Paolo Fabio Zaino (28) 1882 posts |
@ Colin
I have created an experimental assistant that can translate ObjASM to C, althought if it requires a lot more work to have quality that is as usable as PC (Mac/Windows/Linux) AI support code, so that will come after the User Guide Assistant will be completed. Update: P.S. Thanks Stuart! I mean Colin, please offer some help to get some work done before asking for even more, thank you. Guys if you don’t help, we won’t get far with this, again IT’S A LOT OF WORK (capisc?). @ all the users who have already registered for the early access I’ll send you and email with more details, but just in case you’re looking at this thread: Please start a new session, I have just released an update after some issues I have found today. So, if you have an open session you are using an older version of the Assistant, thanks. |
David J. Ruck (33) 1635 posts |
You don’t need AI to do this, you can purely mechanically and fully deterministically translate the ARM instructions into C code, and then recompile that to something else, just using C as a macro assembler. It’s been done for other ISAs for many years. Or are you thinking that AI could somehow produce actual working C code with a human readable structure and meaningful variable and function names? I’m sure it could hallucinate up something that might look like that, but it wouldn’t be real. |
Paolo Fabio Zaino (28) 1882 posts |
@ all the users who have already registered for the early access New set of improvement published, so please (as usual) start a new session. Today’s improvements contain fine-tuning data on: - Debugging things on RISC OS (yes we are working on a general user guide, but this type of info can help general users to present problem with more details) - In particular: - Using the Reporter Module - Using the DADebug - Using the Debugger Module - List Modules with locations, version etc. - Collection system status information - Improved training data on RISC OS Memory Map (but I still need to finish the data from Arthur, so the AI may still struggle with the details, given RO memory map has always been an incremental set of changes) - More trainign data on Configuring RO on Raspberry Pi - More example of Obey files for simple everyday tasks, but the AI seems still to try to add bit from Bash, so (if I have time) tonight I'll add more example specific to the bits I have observed still trying to introduce commands from Bash. This one is tricky because we DO have Bash on RISC OS, so I can't clear Bash knowledge out, I just need more Obey files examples to ensure it has enough data on avoiding certain Bash patterns in Obey Thanks for the feedback and keep finding stuff, we are moving fast, that is good :) |
nemo (145) 2545 posts |
I welcome a conversational RISC OS expert with better manners and greater patience than me and, to be frank, most of yous. ;-) I also will repeat the obvious advice “GIGO” and sadly, much RISC OS documentation is certainly G.
I should think that’s more helpful in context. Overall the conversational answer is goodish, subject to the omissions in the source text – mask b0 is ignored, pollword address must not have b31 set before RO5, pointer alignment unspecified (I use |
Paolo Fabio Zaino (28) 1882 posts |
Same XD – and in my case, I apologies for my lack of patiene but the comments against AI have been made and repeated so many times now, that the authors have all fully qualified to be asked to move their “already seen show” in Aldershot, ’cause none of us speaks for the entirety of the community and we all should know and respect that.
Which is why I transformed it into a format I can edit (and add reference questions to help the LLM figuring out the info), and I’m asking people to help me finding the issues, so I can fix them. The “AI documentation” is now a Graph DB of text (technically we should call it knowledge) that gets transformed into embeddings and then used to extend an already trained LLM.
Thanks for the feedback, I’ll add the details in the “knwoledge” :) As for everyone else, this is exactly the type of feedback I need. The examples above are for the coding AIs, the one here available for early access is the User Guide AI Assistant (so literally everyone can help with it, but so far I have only 6 people). Nemo as for the User Guide AI Assistant, I have fixed the issues with the Shutdown getting mixed up with the Linux shutdown command (in the LLM original knowledge), and few other bits we observed at the last ROUGOL meeting. But thanks for the feedbak here, I’ll add it to the coding AI knowledge. For the reference’s issue: That is tough. On the client the references will be clickable links, but I don’t have anything on-line that maps to the PRM and User Guide (and that I can modify with the fixes). One idea is (thanks to Gerph’s RISC OS Documentation in XML project) is to try to produce a website that will map the AI reference, so by clicking on the AI reference people will get straight into the PRM and UG site (with the updates we are making for the AI and not the copy that is distributed with DDE or the downloadable UG from here). IMHO, it would make no sense to have the AI saying something and then refering to a PRM’s page that has the wrong info. But I am open to suggestions… |
nemo (145) 2545 posts |
For the record, Google Notebook’s excellent results contained multiple citations which also did not copy well. “See PRM3-184” is evidently too much to ask of these beasts. |
David J. Ruck (33) 1635 posts |
I think it is far more likely for the human created PRM page to have the correct information, than any output from an AI. |
Pages: 1 2