HAMMALE commited on
Commit
ddad408
ยท
verified ยท
1 Parent(s): 568b48f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +78 -9
README.md CHANGED
@@ -1,16 +1,85 @@
1
  ---
2
- title: ReACT
3
- emoji: ๐Ÿ’ฌ
4
- colorFrom: yellow
5
  colorTo: purple
6
  sdk: gradio
7
- sdk_version: 5.42.0
8
  app_file: app.py
9
  pinned: false
10
- hf_oauth: true
11
- hf_oauth_scopes:
12
- - inference-api
13
- license: apache-2.0
14
  ---
15
 
16
- An example chatbot using [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and the [Hugging Face Inference API](https://huggingface.co/docs/api-inference/index).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: ReAct - Reasoning Modes Comparison
3
+ emoji: ๐Ÿง 
4
+ colorFrom: blue
5
  colorTo: purple
6
  sdk: gradio
7
+ sdk_version: 6.0.2
8
  app_file: app.py
9
  pinned: false
10
+ license: mit
 
 
 
11
  ---
12
 
13
+ # ๐Ÿง  LLM Reasoning Modes Comparison
14
+
15
+ This Space demonstrates and compares three different reasoning paradigms for Large Language Models using **openai/gpt-oss-20b**:
16
+
17
+ ## ๐ŸŽฏ Reasoning Modes
18
+
19
+ ### 1. **Think-Only** (Chain-of-Thought)
20
+ - Uses internal reasoning and knowledge only
21
+ - Shows step-by-step thought process
22
+ - No external tool access
23
+ - Best for: Problems solvable with general knowledge
24
+
25
+ ### 2. **Act-Only** (Tool Use)
26
+ - Uses external tools to gather information
27
+ - Shows actions and observations only
28
+ - Minimal explicit reasoning
29
+ - Best for: Fact-checking and real-time data retrieval
30
+
31
+ ### 3. **ReAct** (Reasoning + Acting)
32
+ - Interleaves Thought โ†’ Action โ†’ Observation
33
+ - Combines reasoning with tool use
34
+ - Most comprehensive approach
35
+ - Best for: Complex problems requiring both reasoning and external data
36
+
37
+ ## ๐Ÿ› ๏ธ Available Tools
38
+
39
+ The agent has access to these real external tools:
40
+
41
+ - **๐Ÿ” DuckDuckGo Search**: Web search for current information
42
+ - **๐Ÿ“š Wikipedia Search**: Detailed encyclopedic knowledge
43
+ - **๐ŸŒค๏ธ Weather API**: Real-time weather data for any location
44
+ - **๐Ÿงฎ Calculator**: Safe mathematical expression evaluation
45
+ - **๐Ÿ Python REPL**: Execute Python code for data processing
46
+
47
+ ## ๐Ÿš€ How to Use
48
+
49
+ 1. Enter your question in the text box
50
+ 2. Select a reasoning mode (or "All" to compare)
51
+ 3. Click "Run" to see the agent work in real-time
52
+ 4. Watch as thoughts, actions, and observations unfold
53
+
54
+ ## ๐Ÿ“ Example Questions
55
+
56
+ - "What is the capital of France and what's the current weather there?"
57
+ - "Who wrote 'To Kill a Mockingbird' and when was it published?"
58
+ - "Calculate the compound interest on $1000 at 5% annual rate for 3 years"
59
+ - "What is the population of Tokyo and how does it compare to New York City?"
60
+
61
+ ## ๐Ÿ”ง Setup
62
+
63
+ To run this Space, you need to set your Hugging Face token:
64
+
65
+ 1. Go to Space Settings โ†’ Repository Secrets
66
+ 2. Add a secret named `HF_TOKEN` with your Hugging Face API token
67
+ 3. The Space will automatically use this token to access the model
68
+
69
+ ## ๐Ÿ“š Technical Details
70
+
71
+ - **Model**: openai/gpt-oss-20b (via Hugging Face Inference API)
72
+ - **Framework**: Gradio for the UI
73
+ - **Agent Format**: Inspired by smolagents/ReAct paradigm
74
+ - **Streaming**: Real-time display of intermediate steps
75
+
76
+ ## ๐ŸŽ“ Learn More
77
+
78
+ This implementation demonstrates the ReAct (Reason + Act) paradigm described in:
79
+ - Yao et al. (2022) "ReAct: Synergizing Reasoning and Acting in Language Models"
80
+
81
+ The three modes show how different combinations of reasoning and tool use affect problem-solving capabilities.
82
+
83
+ ## ๐Ÿ“„ License
84
+
85
+ MIT License - feel free to use and modify!