Interim blog setup, rough notes being dumped here at the moment - I'll tidy once I get to a milestone. And sorry about the layout, that'll probably take even longer to get around to... #TODO

llama_index SPARQL Notes 03

Published on 2023-08-29 by @danja


I'm down to $0.23 OpenAI API credit, so until I next have $ need to look at things that don't need it. doesn't in itself need the OpenAI API, but a SPARQLy version of Wey Gu's Notebook is my target functional E2E test.

I still have NebulaGraph data generated from Wey's Notebook. I can use nebula-python to pull out data from there, RDFLib to build RDF, sparqlwrapper to push to store. The SPARQL needed will be essentially the same as for Also NebulaGraph <=> RDF utils would be nice to have (may already exist, but I'll pretend I didn't consider that, need to inform myself).

Then -


sudo /usr/local/nebula/scripts/nebula.service start all

Started with :

resp = client.execute_json('MATCH (v:entity) RETURN v')

After converting this to string there were character encoding errors. Should really be investigated properly, but for now I'll just go with some quick & dirty sanitization (Valid RDF literals will probably need something anyhow).

json_str = resp.decode('utf-8') appears to have fixed the encoding issues.