GithubHelp home page GithubHelp logo

logikon-ai / logikon Goto Github PK

View Code? Open in Web Editor NEW
32.0 32.0 0.0 1.9 MB

Analyzing and scoring reasoning traces of LLMs

Home Page: https://logikon.ai

License: Apache License 2.0

Python 100.00%
ai argument-mapping argument-mining argumentation critical-thinking explainable-ai llmops llms metrics mlops observability reasoning reasoning-agent reliable-ai

logikon's People

Contributors

ggbetz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

logikon's Issues

Add examples

Add examples for various use cases:

  • Basic usage
  • Artifacts & metrics zoo
  • Score reasoning trace in task>draft>rate>choose workflow (deliberative prompting)
  • Fact check the reasons in the argumentation (define your own metric based on argument graph)
  • Score reasoning trace in reasoning-enhanced RAG workflow (deliberative prompting)
  • Check reason responsiveness of AI agent (define your own metric based on argument graph)
  • Monitor and train deliberating dspy agents
  • Score all reasoning traces stored in an MLOps platform
  • Build your own visualizations (artifacts)
  • P-tuning LLMs for better reasoning quality

Implement `report_to`

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)

Provide callbacks

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]))

Add MLOps integrations

Add MLOps integrations for

  • Arize
  • Datadog
  • Langfuse
  • Trulens
  • Wandb
  • Langsmith
  • Parea
  • Traceloop
  • Helicone
  • Humanloop
  • ...

Via:

  • report_to #3
  • callbacks #4

Support for chat messages

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.