Skip to content

Instantly share code, notes, and snippets.

View neolee's full-sized avatar

Neo Lee neolee

View GitHub Profile
import re
from txtai import Embeddings, LLM
# Prompt courtesy of the following link: https://github.com/codelion/optillm/blob/main/cot_reflection.py
def cot(system, user):
system = f"""
{system}
You are an AI assistant that uses a Chain of Thought (CoT) approach with reflection to answer queries. Follow these steps: