Modern programming is all about low entropy conversation starters
Programming as writing minimal prompts for LLMs to complete
%%Robots swimming in the cosmos, a paradox by Escher%%
This is a bunch of my code:
# turn the topics column into a list by splitting on commas
tweets_df["Topics"] = tweets_df["Topics"].apply(lambda x: x.split(","))
tweets_df
from sentence_transformers import SentenceTransformer, util
# split dataset into a map of sets of topics per user
topics_per_user = {}
for k, v in tweets_df.iterrows():
user = v["User"]
if user not in topics_per_user:
topics_per_user[user] = set()
for e in v["Topics"]: topics_per_user[user].add(e)
# common topics
common_topics = topics_per_user["louis030195"].intersection(topics_per_user["naval"])
print(f"Common topics: {common_topics}")
# compute the average embedding per user
user_embeddings = {}
for user, topics in topics_per_user.items():
user_embeddings[user] = model.encode([", ".join(topics)])
# compute the cosine similarity between the embeddings
cosine_scores = util.pytorch_cos_sim(
user_embeddings["louis030195"], user_embeddings["naval"]
)
print(f"Similarity score: {cosine_scores}")
Basically modern programming is all about write simple prompts as comment to be completed.
It’s like when you are a CTO, you do the fundamental thinking, the initial prompt, then there is the implementers that create your vision.
This is where the world is heading toward, Imaginary programming will let us think about prompts that are life goals and AI will implement our dream.
“I want to be fit” -> AI will make you do a fast “I want a Ferrari” -> AI will make you generate money