logikon-ai / logikon Goto Github PK
View Code? Open in Web Editor NEWAnalyzing and scoring reasoning traces of LLMs
Home Page: https://logikon.ai
License: Apache License 2.0
Analyzing and scoring reasoning traces of LLMs
Home Page: https://logikon.ai
License: Apache License 2.0
Add examples for various use cases:
Implement report_to
feature for integrations, e.g.:
import logikon
your_mlops_platforms = ["wandb", "langfuse", ...]
# Log scores and artifacts to wandb and langfuse
config = logikon.DebugConfig(
report_to=your_mlops_platforms
)
# LLM generation
...
# Debug and score reasoning
score = logikon.score(config=config, prompt=prompt, completion=completion)
Clean-up, test, and organize dependencies.
Define extras depending on which llm frameworks are used.
Apply logikon
reasoning metrics to monitor and supervise multi-agent systems powered by conversational LLMs, in particular:
Callback for langchain (for example):
from langchain.llms import OpenAI
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain
import logikon
# Configure logikon debugger
config = logikon.DebugConfig(report_to=your_mlops_platforms)
lgk_handler = logikon.CallbackHandler(config=config)
# Set up chain and register debugger
llm = OpenAI()
prompt = PromptTemplate(
input_variables=["question"],
template="{question} Reason carefully before submitting your choice.",
)
chain = LLMChain(llm=llm, prompt=prompt, callbacks=[lgk_handler])
# Run chain
print(chain.run("Vim or Emacs?", callbacks=[lgk_handler]))
For example:
import logikon
import your_mlops_platform
# Retrieve chat between human user and AI assistant
chat_history = your_mlops_platform.get_logs()
# Debug and score reasoning
score = logikon.score(messages=chat_history)
# Log scores
your_mlops_platform.log(score)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.