Using TFire with LLMs
TFire is optimized to be effectively used together with Large Language Models (LLMs) like Claude or ChatGPT. TFire comes with a tailor-made documentation file (found under Downloads) specifically made to be attached when using an LLM.
It is recommended to use an LLM with a large context window (e.g. 100k + tokens) like Claude 3.5.
Example Workflow
- Strategy Development:
# 1. Include documentation
[Paste or attach LLM documentation]
# 2. Describe strategy
"Help me create a momentum strategy that:
- Uses RSI and MACD indicators
- Buys when RSI crosses above 30
- Sells when RSI crosses above 70
- Implements proper error handling"
# 3. Receive and review code
Common Use Cases
- Creating New Layers
# Example prompt:
"'Help me create a new Layer that implements Relative Strength Index (RSI) calculations."
- Building Trading Strategies
# Example prompt:
"Implement a strategy that buys when the 50-day moving average crosses above the 200-day moving average."
- Debugging Code
# Paste code and error message
# Example prompt:
"What might be causing this issue?"
Effective Prompting
Structure your requests like this:
Context: [Paste relevant TFire documentation]
Task: Help me implement [your specific requirement]
Additional requirements:
- [Any specific constraints]
- [Performance considerations]
- [Error handling needs]
Do:
- Be Specific: Clearly describe your requirements and any constraints
- Include Context: Provide relevant documentation sections
- Iterate: Start simple and gradually add complexity
- Validate: Always test generated code thoroughly
- Ask for Explanations: Have the LLM explain the code it generates
Don't:
- Don't assume LLMs have current documentation - always provide it
- Don't rely on LLMs for numerical accuracy - test thoroughly
- Avoid asking for complex strategies without providing context