
Security News
Potemkin Understanding in LLMs: New Study Reveals Flaws in AI Benchmarks
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
A generic functional middleware infrastructure for Python.
Take a look:
from datetime.datetime import now
from hs_formation import wrap
from requests import get
def log(ctx, call):
print("started")
ctx = call(ctx)
print("ended")
return ctx
def timeit(ctx, call):
started = now()
ctx = call(ctx)
ended = now() - started
ctx['duration'] = ended
return ctx
def to_requests(ctx):
get(ctx['url'])
return ctx
fancy_get = wrap(to_requests, middleware=[log, timeit])
fancy_get({'url':'https://google.com'})
Install using pip/pipenv/etc. (we recommend poetry for sane dependency management):
$ poetry add formation
A context
object is a loose bag of objects. With that freedom comes responsibility and opinion.
For example, this is how Formation models a requests
integration, with data flowing inside context
:
FormationHttpRequest
which abstracts the essentials of making an HTTP request (later shipped to requests
itself in the way that it likes)FormationHttpRequest
under the fmtn.req
key.fmtn.req
. For example a request id is kept in the req.id
key. This creates a flat (good thing) dict to probe. The reason additional data does not have the fmtn
prefix is that you can always build your own that uses a different prefix (which you cant say about internal Formation inner workings).You can use this via for_aio_http
To all Contributors - you make this happen, thanks!
Copyright (c) 2018 @jondot. See LICENSE for further details.
FAQs
A generic functional middleware infrastructure for Python.
We found that hs-formation demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.