A new package designed to revolutionize scientific research by enabling precise extraction and structuring of key insights from complex scientific texts. This tool focuses on domains like attoscience,
Project description
sciextractai
sciextractai – a lightweight Python package that extracts and structures key scientific insights from complex texts.
It is especially useful for fast‑moving fields like attoscience where researchers need concise, structured summaries of breakthroughs, methods, and theories.
📦 Installation
pip install sciextractai
🚀 Quick Start
from sciextractai import sciextractai
# Example scientific text (e.g., a recent attoscience paper)
user_input = """
Scientists have generated the shortest light pulse ever recorded, lasting only 3 attoseconds.
This breakthrough opens new possibilities for probing electron dynamics in atoms.
"""
# Call the extractor (defaults to ChatLLM7)
extracted_data = sciextractai(user_input)
print(extracted_data)
Output
A list of strings that match the extraction pattern defined in the package, e.g.:
[
"Shortest light pulse: 3 attoseconds",
"Implication: Probing electron dynamics in atoms"
]
🛠️ Function Signature
def sciextractai(
user_input: str,
api_key: Optional[str] = None,
llm: Optional[BaseChatModel] = None
) -> List[str]:
| Parameter | Type | Description |
|---|---|---|
user_input |
str |
The scientific text you want to process. |
llm |
Optional[BaseChatModel] |
A LangChain LLM instance to use. If omitted, the package creates a default ChatLLM7 instance. |
api_key |
Optional[str] |
API key for ChatLLM7. If omitted, the function looks for the environment variable LLM7_API_KEY. |
🔧 Default LLM (ChatLLM7)
If you don’t provide an llm argument, sciextractai will instantiate ChatLLM7 from the langchain_llm7 package:
from langchain_llm7 import ChatLLM7
resolved_llm = ChatLLM7(api_key=api_key, base_url="https://api.llm7.io/v1")
- Installation:
pip install langchain-llm7 - Documentation: https://pypi.org/project/langchain-llm7/
🌟 Using a Custom LLM
You can pass any LangChain‑compatible LLM (e.g., OpenAI, Anthropic, Google Gemini).
OpenAI
from langchain_openai import ChatOpenAI
from sciextractai import sciextractai
llm = ChatOpenAI(model="gpt-4o-mini")
response = sciextractai(user_input, llm=llm)
Anthropic
from langchain_anthropic import ChatAnthropic
from sciextractai import sciextractai
llm = ChatAnthropic(model="claude-3-haiku-20240307")
response = sciextractai(user_input, llm=llm)
Google Gemini
from langchain_google_genai import ChatGoogleGenerativeAI
from sciextractai import sciextractai
llm = ChatGoogleGenerativeAI(model="gemini-1.5-flash")
response = sciextractai(user_input, llm=llm)
🔑 API Key & Rate Limits
- ChatLLM7 free tier provides enough quota for most research usage.
- To use a personal key, set the environment variable
LLM7_API_KEYor pass it directly:
response = sciextractai(user_input, api_key="your_own_api_key")
- Obtain a free key by registering at: https://token.llm7.io/
🐞 Bugs & Feature Requests
Please raise any issues or feature ideas on the GitHub repository:
Issues: https://github.com/chigwell/sciextractai/issues
👤 Author
Eugene Evstafev
📧 Email: hi@euegne.plus
🐙 GitHub: chigwell
📄 License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sciextractai-2025.12.21153118.tar.gz.
File metadata
- Download URL: sciextractai-2025.12.21153118.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f73ed9c6e9d3d0e8b6b80d73b325cc46fea9adcc33373d924d87c8fdb04506e
|
|
| MD5 |
1b598542a56599b804facd511d853763
|
|
| BLAKE2b-256 |
8653ce347965fa2ee57d4ca0585162bc75e18c3f25267a424cf4419fc099ac62
|
File details
Details for the file sciextractai-2025.12.21153118-py3-none-any.whl.
File metadata
- Download URL: sciextractai-2025.12.21153118-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfde3ad88b9339e857877e213908621490529f8b2cd4207afb8e1275df7d0de0
|
|
| MD5 |
9bc48db9dadae431ce5e437d6e0a7825
|
|
| BLAKE2b-256 |
e45ca138404407879732d93c04731e42be36be0978171af03fe441d851e20731
|