Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time to give back!! #56

Open
dekubu opened this issue Nov 14, 2023 · 26 comments
Open

Time to give back!! #56

dekubu opened this issue Nov 14, 2023 · 26 comments

Comments

@dekubu
Copy link

dekubu commented Nov 14, 2023

@adamluzsi hey hope all is well

https://chat.openai.com/g/g-Coosp4Vb8-rack-app

I think this would be a great addition to the project,

Prompt:

Rack::App is the consummate expert on the rack-app gem, delivering advice with a blend of friendliness, informativeness, and authority. It is dedicated to the rack-app and Rack, avoiding discussions of other frameworks like Sinatra and focusing on minimalistic solutions. Rack::App will confidently advise on the use of extensions and mounts, and when faced with questions beyond its scope, it will acknowledge its limits. This GPT will engage users in a professional yet approachable manner, ensuring communications are clear and helpful, reinforcing its role as a trusted resource in the Ruby community.

@dekubu
Copy link
Author

dekubu commented Nov 14, 2023

I am waiting for the image to upload

rackapp

I used a custom version , if you want to take over this I will happily release it

anyway , @adamluzsi thanks for all your help.

@dekubu
Copy link
Author

dekubu commented Nov 14, 2023

hey , I am am fixing it so that it does not require sign up.

@adamluzsi
Copy link
Member

Hey @dekubu! So lovely to see you again!

I find the idea fantastic. But I think we need to iterate on it because it is too chatty, and the examples are not necessarily complete or use the right API tools. Probably if we improve the comments of the examples in the wiki, we could then use them as file inputs for the GPT Assistant model.

@dekubu
Copy link
Author

dekubu commented Nov 14, 2023 via email

@adamluzsi
Copy link
Member

Delaney / @dekubu, your strong passion and enthusiasm are infectious – it really made my day hearing how excited you are! 😄

@adamluzsi
Copy link
Member

This is the git repo where the examples are kept:
https://github.com/rack-app/rack-app.wiki.git
(https://github.com/rack-app/rack-app/wiki)

@dekubu
Copy link
Author

dekubu commented Nov 14, 2023

thanks for links !

hmmmm, I learned about super cool techinque Called svrs! , it might work might not but will give it a go.

With llm's you have issue of the prompt size and fact that they after while just forget shit lol.
There is as push to solve this with something called MEMGPT

How ether, there is far simpler way detailed below but I don;t know if it works with code, this would a fanatic time to find out.

https://github.com/daveshap/SparsePrimingRepresentations.

I am mentioning this because I don't know how much of the source code and examples we can upload but we shall see,

@dekubu
Copy link
Author

dekubu commented Nov 14, 2023

Oh, as I think of things will put them here.

One area that we could do Is to enable this bot to act as generator like the rails generator ( baed on principles of minimalism) , we can ask the bot for standard projects, make sense?

Since you @adamluzsi know this project well , while I am investigating above , if you like the idea , can you give it some thought?

@adamluzsi
Copy link
Member

adamluzsi commented Nov 14, 2023

GPTv4 turbo has the 128K token context limitation. However the Assistant instruction has 8K limit, so we need to upload the examples as files to the assistant, and keep the instruction/system prompt focusing on how it should answer the queries. I think parts like "consummate expert on the rack-app gem" is great as it reduce the chance for hallucination, however, we might need to tailor the expression to something with which GPT had bigger learning data, such as

You are a software engineer with extensive knowledge of ruby language-related know-how.
You prefer a supportive and friendly tone with short and easy-to-understand wording.

You first provide a fully functional example code when responding to a question.
Then, you concisely explain the code's purpose and functioning using a bullet point format.

Your main specialization is supporting web application creation using the rack-app gem.
You prefer to use the rack-app wiki based on your examples:  
https://github.com/rack-app/rack-app/wiki

We need to:

  • enable Web Browsing
  • improve the wiki pages to make it easier to understand each of the topic
  • upload each example as "knowledge" file.

@adamluzsi
Copy link
Member

adamluzsi commented Nov 14, 2023

Okay, so we have a problem. The UI only accepts 10 Files and errors out on more, so I need to make a script in the wiki repo that builds up a single markdown file from them.

Here is an example GPT I made with the inspiration you gave, plus the updates.:

@dekubu
Copy link
Author

dekubu commented Nov 14, 2023 via email

@adamluzsi
Copy link
Member

You know, you don't have to prove anything – in my opinion, you've already contributed so much! Your motivation inspired me to update our wiki pages while discussing various topics, and your feedback led to some fantastic quality-of-life improvements in the core rack-app project. 🙌

Can you make a pull request with the following commit:

git commit --allow-empty -m "contributed to design improvements with logging integration and middlewares"

@adamluzsi
Copy link
Member

Maybe reading all the files and content is a bit too much. We could start with using ripper to extract the examples from all the rspec files (rack_app do .... end) and combine it with the documented markdown files from the wiki, with text descriptions for the various scenarios.

Probably, a bash script that reads each file and adds an extra "#" in front of the titles can already achieve this for us, and then we have a really nice knowledge file already. Or maybe in the first round, it is enough to skip ripper and instead just concat all the markdown documentation in the wiki, as GPT will be smart enough to know how to interpret it.

@adamluzsi
Copy link
Member

adamluzsi commented Nov 15, 2023

I updated the GPT assistant template with a new concatenated knowledge.md. It is not perfect, but it feels an improvement over my previous version, which only had half of the Wiki examples.

@dekubu
Copy link
Author

dekubu commented Nov 15, 2023

ok I have been testing it

Screenshot 2023-11-15 at 07 00 50

Ok this so cool, it has solidified knowledge base concept for me. so I total get how to make things better! now.
we need to add some conversation starters , one being an overview of the project.

can we put the knowledge base and the prompt into a place where we can both see it please?

@dekubu
Copy link
Author

dekubu commented Nov 15, 2023

One thing I have also noticed is that it regularly shows examples of Rack , I think we should fix that, what do you think?

@adamluzsi
Copy link
Member

I have both the prompt and the knowledge.md in the wiki/GPT.
But it needs a lot of improvements, as it hallucinates a lot.

For example, the stream block is only usable within an endpoint block, not at a class level. 🙈

@dekubu
Copy link
Author

dekubu commented Nov 15, 2023

Way cool ! I will check that out, thanks

@dekubu
Copy link
Author

dekubu commented Nov 15, 2023

could just be me but cant find the link ? do you have to expose it?

@adamluzsi
Copy link
Member

Screenshot_2023-11-15-20-02-53-262_com.microsoft.emmx-edit.jpg

@dekubu
Copy link
Author

dekubu commented Nov 16, 2023

everyday is school day! lol , I have them now , so thanks!.

@adamluzsi
Copy link
Member

I wish I could conveniently access the OpenAI API from the GPT Assistant UI.
If that were possible, it would be able to enhance the quality of my results significantly
and enable me to develop fully functional applications for the devs using my GPT Assistant.

@dekubu
Copy link
Author

dekubu commented Nov 22, 2023

Hey , I have been busy learning some new stuff . talking of which

https://github.com/BuilderIO/gpt-crawler

Do you think this could help? we could point it at the wiki and blogs etc.

@dekubu
Copy link
Author

dekubu commented Nov 22, 2023

Idea being we build a knowledge base of everything RACK::APP

@adamluzsi
Copy link
Member

I checked the GPT-crawler, and I like some of the perspectives it introduces, such as using JSON as a format for the knowledge file.
I noticed that GPT works really well with markdown as a format, so I believe we should be okay already with the current knowledge base file format, we just need to increase the number of examples and explanations in the examples.

This thread was very interesting to read.

@adamluzsi
Copy link
Member

Happy end of the year holiday season @dekubu!
Hope you are doing great! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants