- Using
Science - Wikipedia.pdf
as data source. - Dividing
pdf
into chunks. - Created
VectorDB
. - Embed
query
, on top of that applycosine similarity
followed bycross encoder reranking
. - You will get
Most relevant documents
. - Apply
falcon-40b
model to create ananswer
to query. - I am using
FASTAPI
here.
{
"query" : "What is Science ?"
}
Science is ....
The current project has the blueprint structure of an AI App.
Your mission is to implement an 💬NLP chatbot answering questions about science.
You will add your logic to the main.py
file inside the execute
function.
def execute(request: SimpleText, ray: OpenfabricExecutionRay) -> SimpleText:
output = []
for text in request.text:
response = '' # <<< --Your magic goes here
output.append(response)
return SimpleText(dict(text=output))
You are free to use any package or library you see feet as long as you follow these rules:
- 👎 You can't call any external service (e.g. chatGPT)
- 👎 You can't copy and paste from other peoples work
The application can be executed in two different ways:
- locally by running the
start.sh
- locally by running on FASTAPI
uvicorn app:app --proxy-headers --host 0.0.0.0 --port 80 --reload
- on in a docker container using
Dockerfile
docker build -t open-fabric .
docker run --gpus all --publish 80:80 -it open-fabric
- Minimum GPU VRAM : 24 GB.
Your solution must be uploaded on GitHub, and submit us the link in max 1 week after receiving the task.
Keep in mind that this is the project that will be used to evaluate your skills. So we do expect you to make sure that the app is fully functional and doesn't have any obvious missing pieces.