Adam C.H. Profile picture
Apr 8, 2023 6 tweets 4 min read Read on X
My brother (@0xDACA) and I worked on a fun project tonight, inspired by @yoheinakajima : Coding Agent that follows the Test Driven Development (TDD) methodology!

You write the tests - and the agent runs in a loop until it creates the feature properly!

1/6
#buildinpublic
We start with a simple FastAPI app and two tests - one of which will fail (the "echo" endpoint does not exist)

2/6 ImageImage
Then - we run the agent - it does not read the tests, it can just run them and get the output.

On the first try, it created the "echo" endpoint with a POST method - which failed, as the test defined it as a GET:

3/6 ImageImage
It then took the failures and converted the code to use GET instead - which failed again but with a different error*.

*We tried to make it fail on purpose, so in the test, we defined the expected key name of the return value as "message1" and not "message"

4/6 ImageImage
It, therefore, took the failures (again), and adjusted the code - this time making the return value "message1" - which worked, and the tests passed.

5/6 ImageImage
Currently only works well with small changes, but we are working on cool stuff for it: enabling changes across multiple files, creating its own tests, etc

Framing it inside TDD is super useful to steer it in a specific, measurable direction - while keeping it somewhat autonomous

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Adam C.H.

Adam C.H. Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @adamcohenhillel

Jul 29
So you can actually train a small model to be an expert in a specific domain by leveraging a larger, more capable model to teach it!

I made a simple Colab notebook (open sourced) to fine-tune llama-3-8b on a specific knowledge generated by the huge Llama-3-405B model 👇 Image
You can run it yourself, and the training runs ok with the T4 GPU that is free with the Colab

github.com/adamcohenhille…
It is actually straightforward, we just ask Llama-3-405B running on @togethercompute / @GroqInc
etc to act as an expert in a field, and to generate dataset items to pass this knowledge forward to a smaller model.

(forgive my prompt engs, this can be improved for sure!) Image
Read 6 tweets
Feb 2
A completely open-source AI Wearable device like Avi’s Tab, Rewind’s pendant, and Humane’s Pin!

Not only is it open-source, where you can own your data and switch between foundation models, but you can actually set it up today, not in a few months (oh, and it's cheaper!)
The setup is also quite easy:

1. a simple @supabase instance for vector db, authentication, and compute functions connected either to OpenAI or your own @ollama server running somewhere

2. A @nextjs app (with native support with @capacitorjs )

2. The hardware device Image
The hardware device setup is also quite straightforward, and it will become cheaper and easier to set up in the next week or so (once switching to Raspberry Pi Zero) - so stay tuned!
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(