Muratcan Koylan Profile picture
AI Agent Systems Manager https://t.co/auQ835cMeJ | Founder @helloJeezAI | @opencampus_xyz Alumni | @clayrunhq Creator | ex @useinsider @tmobglobal @jonassoftware | e/acc
Sep 30 5 tweets 5 min read
Comparison of 3 advanced prompting techniques:
(Logic & Graph & Tree)-of-Thought

Tree-of-Thought (ToT)
ToT enhances the basic Chain-of-Thought (CoT) prompting by structuring the reasoning process as a tree.

Each node in this tree symbolizes a "thought" representing a partial solution to the problem.

ToT enables LLMs to explore multiple reasoning paths, systematically evaluate their progress, and backtrack from unpromising branches.

ToT's strengths lie in its capacity to move beyond linear reasoning. It offers a more flexible and exploratory approach to problem-solving.

For example, you want an LLM to solve the following problem:
"If John is taller than Mary, and Mary is taller than Sarah, who is the shortest?"

Using ToT, the LLM might generate a tree-like structure:
Thought 1 (Root): Who is the shortest?
Thought 2 (Branch from Thought 1): John is taller than Mary.
Thought 3 (Branch from Thought 1): Mary is taller than Sarah.
Thought 4 (Branch from Thought 2 & 3): If John is taller than Mary, and Mary is taller than Sarah, then Sarah is the shortest.

This tree structure allows the LLM to break down the problem into smaller, more manageable steps and explore different reasoning paths to arrive at the solution.

Graph-of-Thought (GoT)
GoT employs a graph structure, a more flexible and expressive representation compared to a tree.

In a GoT, vertices represent individual "LLM thoughts" - units of information generated by the LLM, and edges signify dependencies between these thoughts.

This structure enables complex thought manipulations, such as "aggregation," where the system can combine multiple promising thoughts into a new, potentially superior thought.

GoT's key strength is its enhanced flexibility in representing relationships between thoughts.

The research paper demonstrate that this flexibility, combined with thought transformations like aggregation, leads to significant performance gains over ToT in specific tasks, such as sorting.

Imagine you're using an LLM for a creative writing task, and the prompt is "Write a short story about a time traveler."

Using GoT, the LLM might generate different "thought" nodes like "time traveler," "ancient civilization," "paradox," "love story," etc.

The LLM can then establish edges between these nodes based on their relationships (e.g., the time traveler visits the ancient civilization, leading to a paradox and a love story).

This graph structure allows for a more flexible and interconnected representation of thoughts, enabling the LLM to explore different creative pathways and potentially generate a more nuanced and engaging story.

Logic-of-Thought (LoT)
The most recent prompting technique, LoT, tackles a significant challenge faced by neuro-symbolic reasoning methods: information loss during the conversion of natural language into logical expressions.

LoT aims to mitigate this loss by augmenting the original prompts with expanded logical information derived from the input context.

This is achieved through a three-phase process:

Logic Extraction: The LLM extracts propositions and logical relationships from the input context, forming logical expressions.

Logic Extension: The extracted logical expressions are expanded using predefined logical rules.

Logic Translation: The expanded logical expressions are converted back into natural language descriptions, enriching the original prompt with this additional logical information.

LoT's primary strength lies in its ability to bridge the gap between symbolic logic and natural language, reducing information loss and enhancing the LLM's reasoning accuracy.

It is designed to be compatible with existing prompting techniques, allowing for seamless integration with methods like CoT, ToT, and potentially GoT.

The effectiveness of LoT heavily depends on the accuracy of the logic extraction phase. LLMs, while powerful, are still prone to errors in understanding and representing complex logical relationships, which can lead to inaccurate logical expressions and, consequently, flawed reasoning.

For example,
1- Increased immigration diversifies the workforce.
2- When a workforce is more diverse, it becomes more innovative.
3- If a country is more innovative, its economy grows faster.
4- Country X allowed 1000 skilled workers to immigrate last year.
5- If a country increases immigration, that country's economy grows faster.

Whether this inference is correct:
Country X's economy is growing faster than before.

This expanded logical information would be integrated back into the original prompt, making it easier for the LLM to infer the correct answer: "Correct.".

While all three techniques aim to enhance LLM reasoning, their core focuses differ.

ToT primarily targets exploring multiple reasoning pathways.

GoT emphasizes the flexible representation and manipulation of thoughts using a graph structure.

LoT addresses the information loss problem in logical reasoning tasks by enriching the prompt with expanded logical information.

ToT and GoT primarily focus on the structural organization of thoughts.

In contrast, LoT emphasizes augmenting the semantic content of the prompt with explicit logical information.

Despite their differences, these techniques are not mutually exclusive.

Integrating LoT (e.g., logic enrichment) with the structural frameworks of ToT or GoT, potentially leading to even more powerful and accurate reasoning capabilities (~8% increase according to the Logic-of-Thought: Injecting Logic into Contexts for Full Reasoning in Large Language Models paper).Image
Image
Image
Graph of Thoughts: Solving Elaborate Problems with Large Language Models
arxiv.org/abs/2308.09687
Jul 7 6 tweets 3 min read
I replaced a $2000/month predictive analysis software with Julius AI. In this video, I'll show you how to create a complex B2B marketing dataset using GPT. Then, I'll identify companies with a high likelihood of churn, determining their reasons for doing so. Julius AI achieves this using a chain of deterministic actions to leverage various machine learning models.

This tool is incredibly powerful, and I'm excited to share my process with you. Whether you do data analysis or not, I highly recommend Rahul's conversation with @trychroma here to understand how @JuliusAI_ works.

@0interestrates

Mar 5 13 tweets 11 min read
Anthrophic has a very detailed prompting cookbook.

If you're using the world's most powerful LLM, Anthropic's Claude-3, with the same prompts as OpenAI's GPT models, you're not achieving its full potential. Their in-depth prompting cookbook will help you unlock incredible results.

Here's what you need to know: Yesterday, we woke up to a new era.

Anthropic released the world’s most powerful large language model (LLM), Claude 3.

This release introduced a family of three models: Claude-3 Haiku, Claude-3 Sonnet, and Claude-3 Opus.

> Claude 3 Opus surpasses GPT-4 in common benchmarks like MMLU and HumanEval.
> It boasts strong capabilities in analysis, forecasting, content creation, code generation, and languages such as Spanish, Japanese, and French.
> The models support a 200K context window, expandable to 1M tokens for select customers.
> They have robust vision capabilities for processing images, charts, graphs, and diagrams.
> Anthropic claims that Claude 3 has a more nuanced understanding of requests and exhibits fewer refusals compared to previous models.
> Claude 3 Opus achieved around 60% accuracy on GPQA, a challenging dataset created by domain experts.
> The training of Claude 3 included synthetic data generated by AI language models, broadening its training data scope.
> Claude 3 has improved visual capabilities, offering new use cases in industries like legal, finance, healthcare, and customer service.
> The model demonstrates self-awareness and the ability to recognize when it is being evaluated or tested.

If you're like me, following almost every new LLM release and starting to become slightly disappointed with each release that claims to have surpassed GPT-4 but doesn't live up to the hype upon testing, you might wonder if we're nearing the peak of AI hype.

However, Dario Amodei's recent work proves otherwise.

Claude 3's potential is clear.

Now, let's unlock that power with the perfect prompts by revealing must-know techniques and a 'cookbook' of ready-to-use examples.
Sep 26, 2023 25 tweets 7 min read
ChatGPT image recognition is here and it is magical! Image This image is still a mystery... Image
Sep 25, 2023 16 tweets 6 min read
Automate ChatGPT to create highly detailed Midjourney / Dall:E / StabilityAI prompts.

Without any Plugin!

Try MidjourneyQuest, 10-step creative journey🧵: Image I've created over 1,000 images with Midjourney, not only for art purposes but also for professional use, including blog & ebook images, social media posts and much more.

What I've noticed is that if you want to bring what's in your mind to life, you should be knowledgeable in:
Apr 29, 2023 7 tweets 3 min read
🔻My First GPT-4 Project 🔻

I can chat with thousands of pages fast and affordably.

How? Let's try with the latest @wef report (2023 April)

Built with @OpenAI, @pinecone and @LangChainAI

1. Upload the PDF and divide its text into chunks.
2. Store the embeddings in your… twitter.com/i/web/status/1… A big shoutout to @mayowaoshin for providing excellent support to the Open-source AI community!
Apr 14, 2023 4 tweets 1 min read
🤯AI can "see" your thoughts! What's next?! 🧠👀

Osaka University researchers decode brain activity, sparking privacy debates!

How will this power be used? 🚨👇 Image Researchers have used a deep learning AI model #StableDiffusion to decode brain activity, generating images of what test subjects were seeing while inside an MRI.

This breakthrough does not represent mind-reading, as it can only produce images a person has viewed.
For now 🙃