😆Finae
Contact Ning Ren (renning22@gmail.com) for discussion, contribution or ☕.
(Draft)
Finae's vision is to build a AI-powered programming languange and greatly simplify programming.
For now, Finae can be used as a tool to more easily work with LLMs. With simple configurations, LLMs output turns into stable and easy-to-process Python objects.
The key idea is to exploit 🌲tree-of-thoughts and ✔️self-consistency of LLMs and find the stable outputs via heavy/concurrent queries against multiple LLMs.
Think about asking the same question in different words or from different angles. The answer will converge if an LLM really knows it (if the fact was well-spread in the training corpus).
This approach works better with multiple LLMs, given that each LLM is a unique representation of its training dataset. And it also works well with smaller models (~7B parameters) as it eliminates hallucinations.
See more 🪐vision and mission behind Finae.
Samples
Finae class is called concept.
@finae.Concept
class Mountain:
...
@finae.Attribute
def name(self):
...
@finae.Attribute
def location(self):
...
Concept Examples
Mountain
m = Mountain('give me any mountain in this world')
print(m.name())
m = Mountain('Highest mountain in the world')
print(m.altitude())
m = Mountain('Mount Everest')
print(m.altitude())
mountains = Mountain.query('Top 50 mountains in the wolrd')
for m in mountains:
print(m.name())
Integer/Float
i = Integer('give me a code generate integer in python')
i = Integer('show me an example of Python integer')
i = Integer('show me an example of Python float')
Date
d = Date('independence day of United States')
print(d)
d = Date('1995/03/01')
print(d)
d = Date('03-01-1995')
print(d)
d = Date('year 1995, March, first')
print(d)
d = Date('the day after 1995/03/01')
print(d)
d = Date('the day after ', d)
print(d)
Array
a = Array('[1, 2, 3, 4]')
print(a)
a = Array('1, 2, 3, 4')
print(a)
a = Array('1 2 5 6 10')
print(a)
a = Array('1 to 4')
print(a)
a = Array('1 to 4, inclusive')
print(a)
a = Array('give me an array of integer, length less than 20')
print(a)
Numpy, pandas
n = Numpy('give me a numpy array, length 10')
print(n)
n = Numpy("""
1 2 3
4 5 6
7 8 9
""")
print(n)
t = PandasTable('Pandas table, columns: name, school, age')
print(t)
t = PandasTable("""
name school age
foo A y
bar B z
""")
print(t)
Finae concept memories samples it has processed
E.g. up to 100 for example, and ranked by some scores, keep LRU.
for m in Mountain.samples():
print(m)
Finae concept memories/caches the way it parses the input.
The cache is local database file or py that can be checked-in to codebase and version-controlled. (Or delete if want to drop the cache.)
d = Date('independence day of United States')
d = Date('independence day of United States') # read from cache
d = Date('independence day of United States') # read from cache
Install
> pip install -e .
Owner/maintainer
Publish to pip hub
python3 -m pip install --upgrade build
python3 -m pip install --upgrade twine
rm dist/ -rf
python3 -m build
twine check dist/*
twine upload dist/*
Metadata
Release files for finae 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| finae-0.0.2.tar.gz | 12.2 kB | Without provenance | Details for finae-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| finae-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for finae-0.0.2-py3-none-any.whl |
Total release size: 22.9 kB
Release files / finae-0.0.2.tar.gz
| Download URL | finae-0.0.2.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9abd8980029329e6c185f355ddafbeb298bbb373e852192afc4a2ff35cfaf96
|
|
BLAKE2b-256 checksum How to use checksums |
e70f8722b90e92aecc1e15c8346a109440f78c98d0f9aacd9c4b2b69557c4d06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.10
|
Release files / finae-0.0.2-py3-none-any.whl
| Download URL | finae-0.0.2-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ece9a618dfacdd9c4083e80e48bbf8c47a7ce4e1a446985fd5d13e3e1f26d399
|
|
BLAKE2b-256 checksum How to use checksums |
1cf5ac3f60ec18adf450edd390d8412174072308abdfec27ad9f3f982826d741
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.10
|
Security for finae 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.