Kadi-IAM commited on
Commit
2fafc94
·
1 Parent(s): 3c78b28

Clean and rebuild

Browse files
LISA_mini.ipynb ADDED
@@ -0,0 +1,745 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "id": "adcfdba2",
7
+ "metadata": {},
8
+ "outputs": [],
9
+ "source": [
10
+ "# import some packages\n",
11
+ "import os\n",
12
+ "\n",
13
+ "from dotenv import load_dotenv\n",
14
+ "from langchain.document_loaders import PyPDFLoader\n",
15
+ "#from langchain.chat_models import ChatCohere\n",
16
+ "from langchain.text_splitter import CharacterTextSplitter, RecursiveCharacterTextSplitter\n",
17
+ "from langchain.embeddings import OpenAIEmbeddings, HuggingFaceEmbeddings\n",
18
+ "from langchain.vectorstores import FAISS, Chroma\n",
19
+ "from langchain.chains import ConversationalRetrievalChain\n",
20
+ "from langchain.llms import HuggingFaceTextGenInference\n",
21
+ "from langchain.chains.conversation.memory import (\n",
22
+ " ConversationBufferMemory,\n",
23
+ " ConversationBufferWindowMemory,\n",
24
+ ")"
25
+ ]
26
+ },
27
+ {
28
+ "cell_type": "code",
29
+ "execution_count": 2,
30
+ "id": "2d85c6d9",
31
+ "metadata": {},
32
+ "outputs": [],
33
+ "source": [
34
+ "# Set api keys\n",
35
+ "load_dotenv(\"API.env\") # put all the API tokens here, such as openai, huggingface...\n",
36
+ "HUGGINGFACEHUB_API_TOKEN = os.getenv(\"HUGGINGFACEHUB_API_TOKEN\")"
37
+ ]
38
+ },
39
+ {
40
+ "cell_type": "code",
41
+ "execution_count": 3,
42
+ "id": "ffd3db32",
43
+ "metadata": {},
44
+ "outputs": [
45
+ {
46
+ "name": "stderr",
47
+ "output_type": "stream",
48
+ "text": [
49
+ "/mnt/data2/yinghanz/codes/machine_learning_projects/llm/venv/hftest/lib/python3.10/site-packages/pydantic/_internal/_fields.py:151: UserWarning: Field \"model_id\" has conflict with protected namespace \"model_\".\n",
50
+ "\n",
51
+ "You may be able to resolve this warning by setting `model_config['protected_namespaces'] = ()`.\n",
52
+ " warnings.warn(\n",
53
+ "/mnt/data2/yinghanz/codes/machine_learning_projects/llm/venv/hftest/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
54
+ " from .autonotebook import tqdm as notebook_tqdm\n"
55
+ ]
56
+ }
57
+ ],
58
+ "source": [
59
+ "# Set inference link, use this online one for easier reproduce\n",
60
+ "inference_api_url = 'https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta'\n",
61
+ "# Recommend using better LLMs, such as Mixtral 7x8B\n",
62
+ "\n",
63
+ "llm = HuggingFaceTextGenInference(\n",
64
+ " verbose=True, # Provides detailed logs of operation\n",
65
+ " max_new_tokens=1024, # Maximum number of token that can be generated.\n",
66
+ " top_p=0.95, # Threshold for controlling randomness in text generation process. \n",
67
+ " typical_p=0.95, #\n",
68
+ " temperature=0.1, # For choosing probable words.\n",
69
+ " inference_server_url=inference_api_url, # URL des Inferenzservers\n",
70
+ " timeout=120, # Timeout for connection with the url\n",
71
+ " )\n",
72
+ "\n",
73
+ "# Alternative, you can load model locally, e.g.:\n",
74
+ "# model_path = \"where/you/store/local/models/zephyr-7b-beta\" # change this to your model path\n",
75
+ "# model = AutoModelForCausalLM.from_pretrained(model_path, device_map=\"auto\")\n",
76
+ "# tokenizer = AutoTokenizer.from_pretrained(model_path)\n",
77
+ "# pipe = pipeline(\n",
78
+ "# \"text-generation\", model=model, tokenizer=tokenizer, max_new_tokens=1024, model_kwargs={\"temperature\":0.1}\n",
79
+ "# )\n",
80
+ "# llm = HuggingFacePipeline(pipeline=pipe)"
81
+ ]
82
+ },
83
+ {
84
+ "cell_type": "code",
85
+ "execution_count": 4,
86
+ "id": "2d5bacd5",
87
+ "metadata": {},
88
+ "outputs": [],
89
+ "source": [
90
+ "# Function for reading and chunking text\n",
91
+ "def load_pdf_as_docs(pdf_path, loader_module=None):\n",
92
+ " if pdf_path.endswith('.pdf'): # single file\n",
93
+ " pdf_docs = [pdf_path]\n",
94
+ " else: # a directory\n",
95
+ " pdf_docs = [os.path.join(pdf_path, f) for f in os.listdir(pdf_path) if f.endswith('.pdf')]\n",
96
+ " \n",
97
+ " docs = []\n",
98
+ " \n",
99
+ " if loader_module is None: # Set PDFLoader\n",
100
+ " loader_module = PyPDFLoader\n",
101
+ " for pdf in pdf_docs:\n",
102
+ " loader = loader_module(pdf)\n",
103
+ " doc = loader.load()\n",
104
+ " docs.extend(doc)\n",
105
+ " \n",
106
+ " return docs\n",
107
+ "\n",
108
+ "def get_doc_chunks(docs, splitter=None):\n",
109
+ " \"\"\"Split docs into chunks.\"\"\"\n",
110
+ " \n",
111
+ " if splitter is None:\n",
112
+ " splitter = RecursiveCharacterTextSplitter(\n",
113
+ " separators=[\"\\n\\n\", \"\\n\"], chunk_size=256, chunk_overlap=128\n",
114
+ " )\n",
115
+ " chunks = splitter.split_documents(docs)\n",
116
+ " \n",
117
+ " return chunks"
118
+ ]
119
+ },
120
+ {
121
+ "cell_type": "code",
122
+ "execution_count": 5,
123
+ "id": "8cd31248",
124
+ "metadata": {},
125
+ "outputs": [],
126
+ "source": [
127
+ "# Specify the directory containing your PDFs\n",
128
+ "# directory = \"C:\\\\Orga\\\\FestBatt\\\\FB2\\\\LISA\\\\Literature\"\n",
129
+ "directory = \"FestbattLiterature\" # change to your pdf dictory\n",
130
+ "\n",
131
+ "# Find and parse all PDFs in the directory\n",
132
+ "pdf_docs = load_pdf_as_docs(directory, PyPDFLoader)\n",
133
+ "\n",
134
+ "document_chunks = get_doc_chunks(pdf_docs)"
135
+ ]
136
+ },
137
+ {
138
+ "cell_type": "code",
139
+ "execution_count": 6,
140
+ "id": "7bf62c76",
141
+ "metadata": {},
142
+ "outputs": [
143
+ {
144
+ "name": "stderr",
145
+ "output_type": "stream",
146
+ "text": [
147
+ "/mnt/data2/yinghanz/codes/machine_learning_projects/llm/venv/hftest/lib/python3.10/site-packages/torch/cuda/__init__.py:141: UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 11040). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:108.)\n",
148
+ " return torch._C._cuda_getDeviceCount() > 0\n"
149
+ ]
150
+ }
151
+ ],
152
+ "source": [
153
+ "# Set embedding\n",
154
+ "embeddings = HuggingFaceEmbeddings(model_name='BAAI/bge-base-en-v1.5') # choose the one you like\n",
155
+ "\n",
156
+ "# Set vectorstore, e.g. FAISS\n",
157
+ "texts = [\"LISA - Lithium Ion Solid-state Assistant\"]\n",
158
+ "vectorstore = FAISS.from_texts(texts, embeddings) # this is a workaround as FAISS cannot be initilized by FAISS(embedding_function=embeddings), waiting for Langchain fix\n",
159
+ "# You may also use Chroma\n",
160
+ "# vectorstore = Chroma(embedding_function=embeddings)"
161
+ ]
162
+ },
163
+ {
164
+ "cell_type": "code",
165
+ "execution_count": 7,
166
+ "id": "73d560de",
167
+ "metadata": {},
168
+ "outputs": [],
169
+ "source": [
170
+ "# Create retrievers"
171
+ ]
172
+ },
173
+ {
174
+ "cell_type": "code",
175
+ "execution_count": 12,
176
+ "id": "e5796990",
177
+ "metadata": {},
178
+ "outputs": [],
179
+ "source": [
180
+ "# Some advanced RAG, with parent document retriever, hybrid-search and rerank\n",
181
+ "\n",
182
+ "# 1. ParentDocumentRetriever. Note: this will take a long time (~several minutes)\n",
183
+ "\n",
184
+ "from langchain.storage import InMemoryStore\n",
185
+ "from langchain.retrievers import ParentDocumentRetriever\n",
186
+ "# For local storage, ref: https://stackoverflow.com/questions/77385587/persist-parentdocumentretriever-of-langchain\n",
187
+ "store = InMemoryStore()\n",
188
+ "\n",
189
+ "parent_splitter = RecursiveCharacterTextSplitter(separators=[\"\\n\\n\", \"\\n\"], chunk_size=512, chunk_overlap=256)\n",
190
+ "child_splitter = RecursiveCharacterTextSplitter(separators=[\"\\n\\n\", \"\\n\"], chunk_size=256, chunk_overlap=128)\n",
191
+ "\n",
192
+ "parent_doc_retriver = ParentDocumentRetriever(\n",
193
+ " vectorstore=vectorstore,\n",
194
+ " docstore=store,\n",
195
+ " child_splitter=child_splitter,\n",
196
+ " parent_splitter=parent_splitter,\n",
197
+ ")\n",
198
+ "parent_doc_retriver.add_documents(pdf_docs)"
199
+ ]
200
+ },
201
+ {
202
+ "cell_type": "code",
203
+ "execution_count": 11,
204
+ "id": "bc299740",
205
+ "metadata": {},
206
+ "outputs": [],
207
+ "source": [
208
+ "# 2. Hybrid search\n",
209
+ "from langchain.retrievers import BM25Retriever\n",
210
+ "\n",
211
+ "bm25_retriever = BM25Retriever.from_documents(document_chunks, k=5) # 1/2 of dense retriever, experimental value"
212
+ ]
213
+ },
214
+ {
215
+ "cell_type": "code",
216
+ "execution_count": 13,
217
+ "id": "2eb8bc8f",
218
+ "metadata": {},
219
+ "outputs": [
220
+ {
221
+ "name": "stderr",
222
+ "output_type": "stream",
223
+ "text": [
224
+ "config.json: 100%|██████████| 801/801 [00:00<00:00, 2.96MB/s]\n",
225
+ "model.safetensors: 100%|██████████| 2.24G/2.24G [00:06<00:00, 359MB/s]\n",
226
+ "tokenizer_config.json: 100%|██████████| 443/443 [00:00<00:00, 2.68MB/s]\n",
227
+ "sentencepiece.bpe.model: 100%|██████████| 5.07M/5.07M [00:00<00:00, 405MB/s]\n",
228
+ "tokenizer.json: 100%|██████████| 17.1M/17.1M [00:00<00:00, 354MB/s]\n",
229
+ "special_tokens_map.json: 100%|██████████| 279/279 [00:00<00:00, 1.31MB/s]\n"
230
+ ]
231
+ }
232
+ ],
233
+ "source": [
234
+ "# 3. Rerank\n",
235
+ "\"\"\"\n",
236
+ "Ref:\n",
237
+ "https://medium.aiplanet.com/advanced-rag-cohere-re-ranker-99acc941601c\n",
238
+ "https://github.com/langchain-ai/langchain/issues/13076\n",
239
+ "good to read:\n",
240
+ "https://teemukanstren.com/2023/12/25/llmrag-based-question-answering/\n",
241
+ "\"\"\"\n",
242
+ "from __future__ import annotations\n",
243
+ "from typing import Dict, Optional, Sequence\n",
244
+ "from langchain.schema import Document\n",
245
+ "from langchain.pydantic_v1 import Extra, root_validator\n",
246
+ "\n",
247
+ "from langchain.callbacks.manager import Callbacks\n",
248
+ "from langchain.retrievers.document_compressors.base import BaseDocumentCompressor\n",
249
+ "\n",
250
+ "from sentence_transformers import CrossEncoder\n",
251
+ "\n",
252
+ "model_name = \"BAAI/bge-reranker-large\" #\n",
253
+ "\n",
254
+ "class BgeRerank(BaseDocumentCompressor):\n",
255
+ " model_name:str = model_name\n",
256
+ " \"\"\"Model name to use for reranking.\"\"\" \n",
257
+ " top_n: int = 10 \n",
258
+ " \"\"\"Number of documents to return.\"\"\"\n",
259
+ " model:CrossEncoder = CrossEncoder(model_name)\n",
260
+ " \"\"\"CrossEncoder instance to use for reranking.\"\"\"\n",
261
+ "\n",
262
+ " def bge_rerank(self,query,docs):\n",
263
+ " model_inputs = [[query, doc] for doc in docs]\n",
264
+ " scores = self.model.predict(model_inputs)\n",
265
+ " results = sorted(enumerate(scores), key=lambda x: x[1], reverse=True)\n",
266
+ " return results[:self.top_n]\n",
267
+ "\n",
268
+ "\n",
269
+ " class Config:\n",
270
+ " \"\"\"Configuration for this pydantic object.\"\"\"\n",
271
+ "\n",
272
+ " extra = Extra.forbid\n",
273
+ " arbitrary_types_allowed = True\n",
274
+ "\n",
275
+ " def compress_documents(\n",
276
+ " self,\n",
277
+ " documents: Sequence[Document],\n",
278
+ " query: str,\n",
279
+ " callbacks: Optional[Callbacks] = None,\n",
280
+ " ) -> Sequence[Document]:\n",
281
+ " \"\"\"\n",
282
+ " Compress documents using BAAI/bge-reranker models.\n",
283
+ "\n",
284
+ " Args:\n",
285
+ " documents: A sequence of documents to compress.\n",
286
+ " query: The query to use for compressing the documents.\n",
287
+ " callbacks: Callbacks to run during the compression process.\n",
288
+ "\n",
289
+ " Returns:\n",
290
+ " A sequence of compressed documents.\n",
291
+ " \"\"\"\n",
292
+ " \n",
293
+ " if len(documents) == 0: # to avoid empty api call\n",
294
+ " return []\n",
295
+ " doc_list = list(documents)\n",
296
+ " _docs = [d.page_content for d in doc_list]\n",
297
+ " results = self.bge_rerank(query, _docs)\n",
298
+ " final_results = []\n",
299
+ " for r in results:\n",
300
+ " doc = doc_list[r[0]]\n",
301
+ " doc.metadata[\"relevance_score\"] = r[1]\n",
302
+ " final_results.append(doc)\n",
303
+ " return final_results\n",
304
+ " \n",
305
+ " \n",
306
+ "from langchain.retrievers import ContextualCompressionRetriever"
307
+ ]
308
+ },
309
+ {
310
+ "cell_type": "code",
311
+ "execution_count": 14,
312
+ "id": "af780912",
313
+ "metadata": {},
314
+ "outputs": [],
315
+ "source": [
316
+ "# Stack all the retrievers together\n",
317
+ "from langchain.retrievers import EnsembleRetriever\n",
318
+ "# Ensemble all above\n",
319
+ "ensemble_retriever = EnsembleRetriever(retrievers=[bm25_retriever, parent_doc_retriver], weights=[0.5, 0.5])\n",
320
+ "\n",
321
+ "# Re-rank\n",
322
+ "compressor = BgeRerank()\n",
323
+ "rerank_retriever = ContextualCompressionRetriever(\n",
324
+ " base_compressor=compressor, base_retriever=ensemble_retriever\n",
325
+ ")"
326
+ ]
327
+ },
328
+ {
329
+ "cell_type": "code",
330
+ "execution_count": 15,
331
+ "id": "beb9ab21",
332
+ "metadata": {},
333
+ "outputs": [],
334
+ "source": [
335
+ "## Now begin to build Q&A system\n",
336
+ "class RAGChain:\n",
337
+ " def __init__(\n",
338
+ " self, memory_key=\"chat_history\", output_key=\"answer\", return_messages=True\n",
339
+ " ):\n",
340
+ " self.memory_key = memory_key\n",
341
+ " self.output_key = output_key\n",
342
+ " self.return_messages = return_messages\n",
343
+ "\n",
344
+ " def create(self, retriver, llm):\n",
345
+ " memory = ConversationBufferWindowMemory( # ConversationBufferMemory(\n",
346
+ " memory_key=self.memory_key,\n",
347
+ " return_messages=self.return_messages,\n",
348
+ " output_key=self.output_key,\n",
349
+ " )\n",
350
+ "\n",
351
+ " # https://github.com/langchain-ai/langchain/issues/4608\n",
352
+ " conversation_chain = ConversationalRetrievalChain.from_llm(\n",
353
+ " llm=llm,\n",
354
+ " retriever=retriver,\n",
355
+ " memory=memory,\n",
356
+ " return_source_documents=True,\n",
357
+ " rephrase_question=False, # disable rephrase, for test purpose\n",
358
+ " get_chat_history=lambda x: x,\n",
359
+ " )\n",
360
+ " \n",
361
+ " return conversation_chain\n",
362
+ " \n",
363
+ " \n",
364
+ "rag_chain = RAGChain()\n",
365
+ "lisa_qa_conversation = rag_chain.create(rerank_retriever, llm)"
366
+ ]
367
+ },
368
+ {
369
+ "cell_type": "code",
370
+ "execution_count": 16,
371
+ "id": "59159951",
372
+ "metadata": {},
373
+ "outputs": [
374
+ {
375
+ "name": "stderr",
376
+ "output_type": "stream",
377
+ "text": [
378
+ "/mnt/data2/yinghanz/codes/machine_learning_projects/llm/venv/hftest/lib/python3.10/site-packages/langchain_core/_api/deprecation.py:117: LangChainDeprecationWarning: The function `__call__` was deprecated in LangChain 0.1.0 and will be removed in 0.2.0. Use invoke instead.\n",
379
+ " warn_deprecated(\n"
380
+ ]
381
+ },
382
+ {
383
+ "name": "stdout",
384
+ "output_type": "stream",
385
+ "text": [
386
+ " Two common solid electrolytes are LLZO (lithium lanthanum zirconate titanate) and sulfide-based solid electrolytes, as mentioned in the context provided.\n"
387
+ ]
388
+ }
389
+ ],
390
+ "source": [
391
+ "# Now begin to ask question\n",
392
+ "question = \"Please name two common solid electrolytes.\"\n",
393
+ "result = lisa_qa_conversation({\"question\":question, \"chat_history\": []})\n",
394
+ "print(result[\"answer\"])"
395
+ ]
396
+ },
397
+ {
398
+ "cell_type": "code",
399
+ "execution_count": null,
400
+ "id": "f5e3c7b5",
401
+ "metadata": {},
402
+ "outputs": [],
403
+ "source": []
404
+ },
405
+ {
406
+ "cell_type": "code",
407
+ "execution_count": 19,
408
+ "id": "d736960b",
409
+ "metadata": {},
410
+ "outputs": [
411
+ {
412
+ "name": "stdout",
413
+ "output_type": "stream",
414
+ "text": [
415
+ "Running on local URL: http://127.0.0.1:7860\n",
416
+ "Running on public URL: https://3a0ee58b7378104912.gradio.live\n",
417
+ "\n",
418
+ "This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)\n"
419
+ ]
420
+ },
421
+ {
422
+ "data": {
423
+ "text/html": [
424
+ "<div><iframe src=\"https://3a0ee58b7378104912.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
425
+ ],
426
+ "text/plain": [
427
+ "<IPython.core.display.HTML object>"
428
+ ]
429
+ },
430
+ "metadata": {},
431
+ "output_type": "display_data"
432
+ },
433
+ {
434
+ "name": "stdout",
435
+ "output_type": "stream",
436
+ "text": [
437
+ "Answer: Two common solid electrolytes used in lithium metal batteries are poly(ethylene oxide)-based solid electrolytes and lithium phosphate/phosphite or lithium sulfate/sulfite layers.\n",
438
+ "Source document: [Document(page_content='electrolytes (SEs) and in contrast to many liquid electrolytes, SEs are stable under high\\nelectrochemical oxidation potentials up to 5.0 V vs Li/Li+[8]. In addition, solid composite', metadata={'source': 'FestbattLiteraturemini/materials-14-03472-v2.pdf', 'page': 0, 'relevance_score': 0.35495195}), Document(page_content='chieflyforapplicationinelectricvehicles,callsforanodematerialswith\\nimproved practical specific capacity as compared to the theoretical\\ncapacityof372mAhg−1ofgraphite[1,2].Overcominglimitationsof\\norganiccarbonate-basedliquidelectrolytesduetothecomplexinter-\\nfacialchemistryandflammabilityisalsofundamentalindesigningsafer\\nLIBs[3].Inthisregard,researcheffortsaredevotedtoreplacetheli-\\nquid electrolytes with highly-conductive solid electrolytes aiming to', metadata={'source': 'FestbattLiteraturemini/1-s2.0-S1388248120301582-main.pdf', 'page': 0, 'relevance_score': 0.024606787}), Document(page_content='and power density, Li metal as a high energy density anode can be employed with solid\\nelectrolytes (SEs) and in contrast to many liquid electrolytes, SEs are stable under high', metadata={'source': 'FestbattLiteraturemini/materials-14-03472-v2.pdf', 'page': 0, 'relevance_score': 0.014535204}), Document(page_content='+depletion and concentration polarization, immobilized anions,\\nsingle-ion versus dual-ion conduction, Li+diffusion versus Li+migration, limiting current, Li dendrites\\n1. INTRODUCTION\\nSolid electrolytes are currently regarded as the most promising\\nenabler of lithium metal batteries (LMBs), which, at least\\ntheoretically can o ffer enhanced speci fic energies and energy\\ndensities compared to state-of-the-art liquid electrolyte Li-ionbatteries (LIBs).\\n1−4The poly(ethylene oxide)-based solid', metadata={'source': 'FestbattLiteraturemini/stolz-et-al-2022-single-ion-versus-dual-ion-conducting-electrolytes-the-relevance-of-concentration-polarization-in.pdf', 'page': 0, 'relevance_score': 0.013416832}), Document(page_content='J. Effective Optimization of High Voltage Solid State LithiumBatteries by Using Poly(ethylene oxide) Based Polymer Electrolytewith Semi-Interpenetrating Network. Adv. Funct. Mater. 2020 ,30,\\n2006289.\\n( 1 8 )H o m a n n ,G . ;S t o l z ,L . ;W i n t e r ,M . ;K a s n a t s c h e e w ,J .\\nElimination of “Voltage Noise ”of Poly (Ethylene Oxide)-Based\\nSolid Electrolytes in High-Voltage Lithium Batteries: Linear versusNetwork Polymers. iScience 2020 ,23, 101225.', metadata={'source': 'FestbattLiteraturemini/stolz-et-al-2022-single-ion-versus-dual-ion-conducting-electrolytes-the-relevance-of-concentration-polarization-in.pdf', 'page': 6, 'relevance_score': 0.0091508655}), Document(page_content='electrolytes, whichmayinsituformahomogeneous lithium\\nphosphate/phosphite orlithium sulfate/sulfite layerare\\npromising forthemodification ofnewelectrolytes. These\\nresultshighlight thepossibility ofsolvinginterfacial prob-', metadata={'source': 'FestbattLiteraturemini/Angew Chem Int Ed - 2022 - Zuo - Impact of the Chlorination of Lithium Argyrodites on the Electrolyte Cathode Interface in.pdf', 'page': 6, 'relevance_score': 0.0059685726}), Document(page_content='“k” is Boltzmann ’s constant. Note that the “ σ” data obtained at \\nSmall 2020, 16, 2000279\\nFigure 1. Schematic illustration of the interface between LLZO SE and \\nLFP cathode. “magnified view” shows the ILE interlayer between the \\ncathode and the solid electrolyte enabling fast ionic transport.', metadata={'source': 'FestbattLiteraturemini/Small - 2020 - Pervez - Overcoming the Interfacial Limitations Imposed by the Solid Solid Interface in Solid‐State.pdf', 'page': 1, 'relevance_score': 0.0007537542}), Document(page_content='affecttheelectrochemical decomposition behavior aswellas\\ntheinterfacial reaction between SEandNCM.Thus,new\\nelectrolytes, whichmayinsituformahomogeneous lithium\\nphosphate/phosphite orlithium sulfate/sulfite layerare', metadata={'source': 'FestbattLiteraturemini/Angew Chem Int Ed - 2022 - Zuo - Impact of the Chlorination of Lithium Argyrodites on the Electrolyte Cathode Interface in.pdf', 'page': 6, 'relevance_score': 0.0005863567}), Document(page_content='From a managerial point of view, it is key that the two efforts grow simultaneously as a combined solution to tribology’s digital transformation.\\nCoping with the challenge of defining the common terms which describe tribological specimens, equipment', metadata={'source': 'FestbattLiteraturemini/s41597-022-01429-9.pdf', 'page': 1, 'relevance_score': 7.6203854e-05})]\n",
439
+ "Answer: Unfortunately, the provided context does not include information on how to synthesize gc-LPSC. You may need to consult additional resources or contact the authors of the context provided for more information.\n",
440
+ "Source document: [Document(page_content='or high temperature steps which may affect the scalability of the \\nsynthesis process and increase the cost.Li-garnets are promising inorganic ceramic solid electrolytes for lithium metal', metadata={'source': 'FestbattLiteraturemini/Small - 2020 - Pervez - Overcoming the Interfacial Limitations Imposed by the Solid Solid Interface in Solid‐State.pdf', 'page': 0, 'relevance_score': 0.2680533}), Document(page_content='enabler of lithium metal batteries (LMBs), which, at least\\ntheoretically can o ffer enhanced speci fic energies and energy\\ndensities compared to state-of-the-art liquid electrolyte Li-ionbatteries (LIBs).\\n1−4The poly(ethylene oxide)-based solid', metadata={'source': 'FestbattLiteraturemini/stolz-et-al-2022-single-ion-versus-dual-ion-conducting-electrolytes-the-relevance-of-concentration-polarization-in.pdf', 'page': 0, 'relevance_score': 0.14643796}), Document(page_content='Lithium metal batteries (LMBs) promise higher energy densities\\nand speci fic energies compared to the state-of-the-art (SOTA) Li\\nion batteries (LIBs) [1–4]. However, a suitable solid electrolyte\\nor liquid electrolyte/separator system for high-performance andsafe cell (-stack) operation remains the key for application andis the predominant actual focus of research and development(R&D) [5–11].\\nThe organic -,i.e.solid polymer-based electrolytes (SPEs) are', metadata={'source': 'FestbattLiteraturemini/1-s2.0-S1369702120304521-main.pdf', 'page': 0, 'relevance_score': 0.046960726}), Document(page_content='Performance of Solid Polymer Electrolytes for Use in Solid-StateLithium Batteries. iScience 2020 ,23, 101597.\\n(8) Jung, K. N.; Shin, H. S.; Park, M. S.; Lee, J. W. Solid-State\\nLithium Batteries: Bipolar Design, Fabrication, and Electrochemistry.\\nChemElectroChem 2019 ,6, 3842−3859.\\n(9) Simonetti, E.; Carewska, M.; Di Carli, M.; Moreno, M.; De\\nFrancesco, M.; Appetecchi, G. B. Towards improvement of the\\nelectrochemical properties of ionic liquid-containing polyethylene', metadata={'source': 'FestbattLiteraturemini/stolz-et-al-2022-single-ion-versus-dual-ion-conducting-electrolytes-the-relevance-of-concentration-polarization-in.pdf', 'page': 6, 'relevance_score': 0.01367707}), Document(page_content='adjusted to ensure a balance between the number of active charge carriers (Li ions) and viscosity of the IL. The ILE was further dried at 60 °C under vacuum to decrease the water content below 5 ppm, as \\ndetected by Karl–Fischer measurements.\\nPreparation of LFP Positive Electrodes (Cathodes): Carbon-coated LFP \\nwas synthesized via a solid state method.\\n[56] Stoichiometric amounts \\nof lithium carbonate (Li 2CO 3; Aldrich, 99.95%), ammonium hydrogen', metadata={'source': 'FestbattLiteraturemini/Small - 2020 - Pervez - Overcoming the Interfacial Limitations Imposed by the Solid Solid Interface in Solid‐State.pdf', 'page': 8, 'relevance_score': 0.0011098508}), Document(page_content='avoidanyshortcircuit,astheSi-FLGdiskhasØ18mm).TheBLPEfortheionicconductivitymeasurementwaspreparedfollowingthesameprocedureusedforSi-FLG/BLPE,butnoelectrodewasusedinthiscase.\\nThe Si-FLG/BLPE was assembled in an ECC-Std cell (EL-cell,\\nGermany) with a 18 mm Li metal disk anode (200 µm thick,\\nAlbermarle)inatwo-electrodesconfiguration.TheLi||Si-FLGcellwith\\nIL_liqwasassembledusingaglasswoolWhatmanseparatordrenched\\nwith200µLofelectrolyte.Testcellsweregalvanostaticallycycled(GC)', metadata={'source': 'FestbattLiteraturemini/1-s2.0-S1388248120301582-main.pdf', 'page': 1, 'relevance_score': 0.0005449906}), Document(page_content='LiNbO 3layer was deposited on the garnet type lithium ion conductor Li 6.45Al0.05La3Zr1.6Ta0.4O12(LLZTO) to improve its\\ninterface to lithium metal and reduce dendrite formation. The application of the thin film reduced the interface resistance between', metadata={'source': 'FestbattLiteraturemini/Mann_2022_J._Electrochem._Soc._169_040564.pdf', 'page': 1, 'relevance_score': 8.970482e-05}), Document(page_content='Zenodo (CERN & OpenAIRE 2013). The listed repositories are all generic and represent only a \\nselection of the existing open-source systems (Amorim et al. 2017).\\nA second type of system in addition to the repositories, which is also increasingly used in', metadata={'source': 'FestbattLiteraturemini/kadi4mat.pdf', 'page': 1, 'relevance_score': 7.65131e-05}), Document(page_content='A second type of system in addition to the repositories, which is also increasingly used in \\nexperimentally oriented research areas, are the electronic lab notebooks (ELN) (Rubacha, Rattan', metadata={'source': 'FestbattLiteraturemini/kadi4mat.pdf', 'page': 1, 'relevance_score': 7.6393466e-05})]\n",
441
+ "Answer: Yes, the paper \"Kadi4Mat: A Research Data Infrastructure for Materials Science\" by C, Schoof, E, Tosato, G, Zhao, Y, Zschumme, P, and Selzer, M, published in the Data Science Journal in 2021, provides an overview of Kadi4Mat, a research data infrastructure for materials science. It discusses the components of Kadi4Mat, including the electronic laboratory notebook (ELN), data management, and data analysis, and provides examples of how Kadi4Mat has been used in materials science research. This paper can help you gain a deeper understanding of Kadi4Mat and its potential applications in materials science research.\n",
442
+ "Source document: [Document(page_content='deeper understanding of the phenomena that govern friction and wear. Missing community-wide data', metadata={'source': 'FestbattLiteraturemini/s41597-022-01429-9.pdf', 'page': 0, 'relevance_score': 0.06298193}), Document(page_content='32. Brandt, N. et al. Kadi4mat: A research data infrastructure for materials science. Data Sci. J. 20, 1–14 (2021).\\n 33. Brandt, N. et al. Managing FAIR tribological data using Kadi4Mat. Data 7, 15 (2022).\\n 34. Garabedian, N. et al . FAIR Data Package of a Tribological Showcase Pin-on-Disk Experiment. Zenodo https://doi.org/10.5281/\\nzenodo.5720626 (2021).\\n 35. Garabedian, N. et al. Generating FAIR research data in experimental tribology. Zenodo https://doi.org/10.5281/zenodo.6349293 (2022).', metadata={'source': 'FestbattLiteraturemini/s41597-022-01429-9.pdf', 'page': 10, 'relevance_score': 0.03710895}), Document(page_content='C, Schoof, E, Tosato, G, Zhao, \\nY, Zschumme, P and Selzer, M. \\n2021. Kadi4Mat: A Research \\nData Infrastructure for \\nMaterials Science. Data Science \\nJournal , 20: 8, pp. 1– 14. DOI: \\nhttps://doi.org/10.5334/dsj-\\n2021-008\\nSubmitted: 16 October 2020 \\nAccepted: 27 January 2021 \\nPublished: 10 February 2021\\nCOPYRIGHT: \\n© 2021 The Author(s). This is an \\nopen-access article distributed \\nunder the terms of the Creative \\nCommons Attribution 4.0 \\nInternational License (CC-BY', metadata={'source': 'FestbattLiteraturemini/kadi4mat.pdf', 'page': 13, 'relevance_score': 0.03163605}), Document(page_content='Brandt, N. 2020. Kadi4Mat – Karlsruhe Data Infrastructure for Materials Science . URL: https://kadi.iam-cms.\\nkit.edu (visited on Sept. 30, 2020).\\nBrandt, N, et al. Oct. 16, 2020. IAM-CMS/Kadi: Kadi4Mat. Version 0.2.0. Zenodo . DOI: https://doi.\\norg/10.5281/ZENODO.4088270\\nCantor, S and Scavo, T. 2005. Shibboleth Architecture. Protocols and Profiles, 10: 16. DOI: https://doi.\\norg/10.26869/TI.66.1\\nCARPi, N, Minges, A and Piel, M. Apr. 14, 2017. eLabFTW: An Open Source Laboratory Notebook for', metadata={'source': 'FestbattLiteraturemini/kadi4mat.pdf', 'page': 11, 'relevance_score': 0.01203158}), Document(page_content='various tools and technical infrastructures. The components can be used by web- and desktop-\\nbased applications, via uniform interfaces. Both a graphical and a programmatic interface \\nare provided, using machine-readable formats and various exchange protocols. In Figure 2 , a \\nconceptual overview of the infrastructure of Kadi4Mat is presented.\\n2.1 ELECTRONIC LAB NOTEBOOK\\nIn the ELN component, the so-called workflows are of particular importance. A workflow is a', metadata={'source': 'FestbattLiteraturemini/kadi4mat.pdf', 'page': 2, 'relevance_score': 0.004907727}), Document(page_content='plinarity of the field: many seemingly trivial tribological problems require a deep, but still holistic, understanding of processes and mechanisms that act between, at, and underneath contacting surfaces\\n12. A tribological response', metadata={'source': 'FestbattLiteraturemini/s41597-022-01429-9.pdf', 'page': 0, 'relevance_score': 7.9162426e-05}), Document(page_content='alumina crucibles. A photo of the sintered LLZO pellet is shown \\nin the inset of Figure 2a while a low magnification SEM image is shown in Figure S2, Supporting Information. The sintering \\nand pellet pressing conditions were optimized to get the pure', metadata={'source': 'FestbattLiteraturemini/Small - 2020 - Pervez - Overcoming the Interfacial Limitations Imposed by the Solid Solid Interface in Solid‐State.pdf', 'page': 1, 'relevance_score': 7.627518e-05}), Document(page_content='mitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/. © The Author(s) 2022', metadata={'source': 'FestbattLiteraturemini/s41597-022-01429-9.pdf', 'page': 10, 'relevance_score': 7.626042e-05}), Document(page_content='at 1100 °C for 3 h. To get desired dimensions, the pellets were polished with Si-carbide sand paper (grit size 400) under argon environment to obtain a thickness of ≈500 µm and a geometric area of ≈0.785 cm\\n2 for \\neach side.', metadata={'source': 'FestbattLiteraturemini/Small - 2020 - Pervez - Overcoming the Interfacial Limitations Imposed by the Solid Solid Interface in Solid‐State.pdf', 'page': 7, 'relevance_score': 7.619601e-05})]\n",
443
+ "now reading document\n",
444
+ "file is located at /tmp/gradio/4067b227cf47cb8a25bd94e77cfd2193637b225e/10.5445IR1000071294.pdf\n",
445
+ "now creating vectordatabase\n"
446
+ ]
447
+ }
448
+ ],
449
+ "source": [
450
+ "# The rests are for Gradio GUI\n",
451
+ "\n",
452
+ "import gradio as gr\n",
453
+ "import time\n",
454
+ "from pathlib import Path\n",
455
+ "\n",
456
+ "# Gradio utils\n",
457
+ "def add_text(history, text):\n",
458
+ " \"\"\"Add conversation to history message.\"\"\"\n",
459
+ " history = history + [(text, None)]\n",
460
+ " yield history, \"\"\n",
461
+ "\n",
462
+ "\n",
463
+ "def bot_lisa(history):\n",
464
+ " \"\"\"Get answer from LLM.\"\"\"\n",
465
+ " result = lisa_qa_conversation(\n",
466
+ " {\n",
467
+ " \"question\": history[-1][0], # or \"query\" if RetrievalQA\n",
468
+ " \"chat_history\": history[:-1],\n",
469
+ " }\n",
470
+ " )\n",
471
+ " print(f\"Answer: {result['answer']}\")\n",
472
+ " print(f\"Source document: {result['source_documents']}\") # for debug\n",
473
+ " # Citation post-processing\n",
474
+ " answer_text = result[\"answer\"].strip()\n",
475
+ " history[-1][1] = \"\" # Fake stream, TODO: implement streaming\n",
476
+ " for character in result[\"answer\"].strip():\n",
477
+ " time.sleep(0.002)\n",
478
+ " history[-1][1] += character\n",
479
+ " yield history, \"citation place holder\"\n",
480
+ "\n",
481
+ "\n",
482
+ "def bot(history, qa_conversation):\n",
483
+ " \"\"\"Get answer from LLM.\"\"\"\n",
484
+ " # print(\"id of qa conver\", id(qa_conversation)) # for debug\n",
485
+ " if qa_conversation is None:\n",
486
+ " gr.Warning(\"Please upload a document first.\")\n",
487
+ " \n",
488
+ " result = qa_conversation(\n",
489
+ " {\n",
490
+ " \"question\": history[-1][0], # or \"query\" if RetrievalQA\n",
491
+ " \"chat_history\": history[:-1],\n",
492
+ " }\n",
493
+ " )\n",
494
+ " print(f\"Source document: {result['source_documents']}\") # for debug\n",
495
+ " history[-1][1] = \"\" # Fake stream, TODO: implement streaming\n",
496
+ " for character in result[\"answer\"].strip():\n",
497
+ " time.sleep(0.002)\n",
498
+ " history[-1][1] += character\n",
499
+ " yield history\n",
500
+ "\n",
501
+ "\n",
502
+ "# Ref: https://huggingface.co/spaces/fffiloni/langchain-chat-with-pdf\n",
503
+ "def document_changes(doc_path):#, repo_id):\n",
504
+ " if doc_path is None:\n",
505
+ " gr.Warning(\"Please choose a document first and wait until uploaded.\")\n",
506
+ " return \"Please choose a document and wait until uploaded.\", None # for langchain_status, qa_conversation\n",
507
+ " \n",
508
+ " print(\"now reading document\")\n",
509
+ " print(f\"file is located at {doc_path[0]}\")\n",
510
+ " \n",
511
+ " file_extension = Path(doc_path[0]).suffix\n",
512
+ " if file_extension == \".pdf\":\n",
513
+ " pdf_docs = load_pdf_as_docs(doc_path[0])\n",
514
+ " document_chunks = get_doc_chunks(pdf_docs)\n",
515
+ " elif file_extension == \".xml\":\n",
516
+ " raise\n",
517
+ " # documents = load_xml_as_docs(doc_path[0])\n",
518
+ " \n",
519
+ " print(\"now creating vectordatabase\")\n",
520
+ " \n",
521
+ " texts = [\"LISA - Lithium Ion Solid-state Assistant\"]\n",
522
+ " vectorstore = FAISS.from_texts(texts, embeddings)\n",
523
+ "\n",
524
+ " store = InMemoryStore()\n",
525
+ "\n",
526
+ " parent_splitter = RecursiveCharacterTextSplitter(separators=[\"\\n\\n\", \"\\n\"], chunk_size=512, chunk_overlap=256)\n",
527
+ " child_splitter = RecursiveCharacterTextSplitter(separators=[\"\\n\\n\", \"\\n\"], chunk_size=256, chunk_overlap=128)\n",
528
+ "\n",
529
+ " parent_doc_retriver = ParentDocumentRetriever(\n",
530
+ " vectorstore=vectorstore,\n",
531
+ " docstore=store,\n",
532
+ " child_splitter=child_splitter,\n",
533
+ " parent_splitter=parent_splitter,\n",
534
+ " )\n",
535
+ " parent_doc_retriver.add_documents(pdf_docs)\n",
536
+ "\n",
537
+ " bm25_retriever = BM25Retriever.from_documents(document_chunks, k=5) # 1/2 of dense retriever, experimental value\n",
538
+ "\n",
539
+ " # Ensemble all above\n",
540
+ " ensemble_retriever = EnsembleRetriever(retrievers=[bm25_retriever, parent_doc_retriver], weights=[0.5, 0.5])\n",
541
+ "\n",
542
+ " compressor = BgeRerank()\n",
543
+ " rerank_retriever = ContextualCompressionRetriever(\n",
544
+ " base_compressor=compressor, base_retriever=ensemble_retriever\n",
545
+ " )\n",
546
+ "\n",
547
+ " rag_chain = RAGChain()\n",
548
+ " qa_conversation = rag_chain.create(rerank_retriever, llm)\n",
549
+ " \n",
550
+ " print(\"now getting llm model\")\n",
551
+ " \n",
552
+ "\n",
553
+ " file_name = Path(doc_path[0]).name # First file\n",
554
+ " return f\"Ready for {file_name}\", qa_conversation\n",
555
+ "\n",
556
+ "\n",
557
+ "# Main gradio UI\n",
558
+ "def main():\n",
559
+ " # Gradio interface\n",
560
+ " with gr.Blocks() as demo:\n",
561
+ " ######################################################################\n",
562
+ " # LISA chat tab\n",
563
+ "\n",
564
+ " # Title info\n",
565
+ " gr.Markdown(\"## LISA\")\n",
566
+ " gr.Markdown(\"Q&A system with RAG.\")\n",
567
+ "\n",
568
+ " with gr.Tab(\"LISA\"):\n",
569
+ " # Chatbot\n",
570
+ " chatbot = gr.Chatbot(\n",
571
+ " [],\n",
572
+ " elem_id=\"chatbot\",\n",
573
+ " label=\"Document Assistant (chat-history context is not supported at the moment, fixing...)\",\n",
574
+ " bubble_full_width=False,\n",
575
+ " show_copy_button=True,\n",
576
+ " likeable=True,\n",
577
+ " ) # .style(height=750)\n",
578
+ " with gr.Row():\n",
579
+ " with gr.Column(scale=80):\n",
580
+ " user_txt = gr.Textbox(\n",
581
+ " label=\"Question\",\n",
582
+ " placeholder=\"Type question and press Enter\",\n",
583
+ " ) # .style(container=False)\n",
584
+ " with gr.Column(scale=10):\n",
585
+ " submit_btn = gr.Button(\"Submit\", variant=\"primary\")\n",
586
+ " with gr.Column(scale=10):\n",
587
+ " clear_btn = gr.Button(\"Clear\", variant=\"stop\")\n",
588
+ " # Reference (citations)\n",
589
+ " with gr.Accordion(\"Advanced - Document references\", open=False):\n",
590
+ " doc_citation = gr.Markdown()\n",
591
+ " # alternative: https://www.gradio.app/guides/creating-a-chatbot-fast\n",
592
+ " gr.Examples(\n",
593
+ " examples=[\n",
594
+ " \"Please name two common solid electrolytes.\",\n",
595
+ " \"Please name two common oxide solid electrolytes.\",\n",
596
+ " \"Please tell me what is solid-state battery.\",\n",
597
+ " \"How to synthesize gc-LPSC?\",\n",
598
+ " \"Please tell me the purpose of Kadi4Mat.\",\n",
599
+ " \"Who is working on Kadi4Mat?\",\n",
600
+ " \"Can you recommend a paper to get a deeper understanding of Kadi4Mat?\",\n",
601
+ " # \"How to synthesize gc-LPSC, e.g., glass-ceramic Li5.5PS4.5Cl1.5?\",\n",
602
+ " ],\n",
603
+ " inputs=user_txt,\n",
604
+ " outputs=chatbot,\n",
605
+ " fn=add_text,\n",
606
+ " # cache_examples=True,\n",
607
+ " )\n",
608
+ "\n",
609
+ " # Manage functions\n",
610
+ " user_txt.submit(add_text, [chatbot, user_txt], [chatbot, user_txt]).then(\n",
611
+ " bot_lisa, chatbot, [chatbot, doc_citation]\n",
612
+ " )\n",
613
+ "\n",
614
+ " submit_btn.click(\n",
615
+ " add_text,\n",
616
+ " [chatbot, user_txt],\n",
617
+ " [chatbot, user_txt],\n",
618
+ " # concurrency_limit=8,\n",
619
+ " queue=False,\n",
620
+ " ).then(bot_lisa, chatbot, [chatbot, doc_citation])\n",
621
+ "\n",
622
+ " clear_btn.click(lambda: None, None, chatbot, queue=False)\n",
623
+ "\n",
624
+ " ######################################################################\n",
625
+ "\n",
626
+ " ######################################################################\n",
627
+ " # Document-based QA\n",
628
+ "\n",
629
+ " with gr.Tab(\"Document-based Q&A\"):\n",
630
+ " qa_conversation = gr.State()\n",
631
+ " \n",
632
+ " with gr.Row():\n",
633
+ " with gr.Column(scale=3, variant=\"load_file_panel\"):\n",
634
+ " with gr.Row():\n",
635
+ " gr.HTML(\n",
636
+ " \"Upload a pdf/xml file, click the Load file button and when everything is ready, you can start asking questions about the document.\"\n",
637
+ " )\n",
638
+ " with gr.Row():\n",
639
+ " uploaded_doc = gr.File(\n",
640
+ " label=\"Upload pdf/xml file (single)\",\n",
641
+ " file_count=\"multiple\", # For better looking, but only support 1 file\n",
642
+ " file_types=[\".pdf\", \".xml\"],\n",
643
+ " type=\"filepath\",\n",
644
+ " height=100,\n",
645
+ " )\n",
646
+ "\n",
647
+ " with gr.Row():\n",
648
+ " langchain_status = gr.Textbox(\n",
649
+ " label=\"Status\", placeholder=\"\", interactive=False\n",
650
+ " )\n",
651
+ " load_document = gr.Button(\"Load file\")\n",
652
+ "\n",
653
+ " with gr.Column(scale=7, variant=\"chat_panel\"):\n",
654
+ " chatbot = gr.Chatbot(\n",
655
+ " [],\n",
656
+ " elem_id=\"chatbot\",\n",
657
+ " # label=\"Document Assistant (chat-history context is not supported at the moment, fixing...)\",\n",
658
+ " label=\"Document Assistant (chat-history context is not supported at the moment, fixing...)\",\n",
659
+ " show_copy_button=True,\n",
660
+ " likeable=True,\n",
661
+ " ) # .style(height=350)\n",
662
+ " docqa_question = gr.Textbox(\n",
663
+ " label=\"Question\",\n",
664
+ " placeholder=\"Type question and press Enter/click Submit\",\n",
665
+ " )\n",
666
+ " with gr.Row():\n",
667
+ " with gr.Column(scale=50):\n",
668
+ " docqa_submit_btn = gr.Button(\"Submit\", variant=\"primary\")\n",
669
+ " with gr.Column(scale=50):\n",
670
+ " docqa_clear_btn = gr.Button(\"Clear\", variant=\"stop\")\n",
671
+ " \n",
672
+ " gr.Examples(\n",
673
+ " examples=[\n",
674
+ " \"Summarize the paper\",\n",
675
+ " \"Summarize the paper in 3 bullet points\",\n",
676
+ " \"What are the contributions of this paper\",\n",
677
+ " \"Explain the practical implications of this paper\",\n",
678
+ " \"Methods used in this paper\",\n",
679
+ " \"What data has been used in this paper\",\n",
680
+ " \"Results of the paper\",\n",
681
+ " \"Conclusions from the paper\",\n",
682
+ " \"Limitations of this paper\",\n",
683
+ " \"Future works suggested in this paper\",\n",
684
+ " ],\n",
685
+ " inputs=docqa_question,\n",
686
+ " outputs=chatbot,\n",
687
+ " fn=add_text,\n",
688
+ " # cache_examples=True,\n",
689
+ " )\n",
690
+ "\n",
691
+ " load_document.click(\n",
692
+ " document_changes,\n",
693
+ " inputs=[uploaded_doc], # , repo_id],\n",
694
+ " outputs=[langchain_status, qa_conversation],#, docqa_db, docqa_retriever],\n",
695
+ " queue=False,\n",
696
+ " )\n",
697
+ " \n",
698
+ " docqa_question.submit(add_text, [chatbot, docqa_question], [chatbot, docqa_question]).then(\n",
699
+ " bot, [chatbot, qa_conversation], chatbot\n",
700
+ " )\n",
701
+ " docqa_submit_btn.click(add_text, [chatbot, docqa_question], [chatbot, docqa_question]).then(\n",
702
+ " bot, [chatbot, qa_conversation], chatbot\n",
703
+ " )\n",
704
+ "\n",
705
+ " gr.Markdown(\"*Notes: The model may produce incorrect statements. Users should treat these outputs as suggestions or starting points, not as definitive or accurate facts.\")\n",
706
+ "\n",
707
+ " ######################################################################\n",
708
+ "\n",
709
+ " demo.queue().launch(share=True)\n",
710
+ " \n",
711
+ " \n",
712
+ "main()"
713
+ ]
714
+ },
715
+ {
716
+ "cell_type": "code",
717
+ "execution_count": null,
718
+ "id": "e2864a11",
719
+ "metadata": {},
720
+ "outputs": [],
721
+ "source": []
722
+ }
723
+ ],
724
+ "metadata": {
725
+ "kernelspec": {
726
+ "display_name": "Python 3 (ipykernel)",
727
+ "language": "python",
728
+ "name": "python3"
729
+ },
730
+ "language_info": {
731
+ "codemirror_mode": {
732
+ "name": "ipython",
733
+ "version": 3
734
+ },
735
+ "file_extension": ".py",
736
+ "mimetype": "text/x-python",
737
+ "name": "python",
738
+ "nbconvert_exporter": "python",
739
+ "pygments_lexer": "ipython3",
740
+ "version": "3.10.13"
741
+ }
742
+ },
743
+ "nbformat": 4,
744
+ "nbformat_minor": 5
745
+ }
README.md CHANGED
@@ -1,12 +1,13 @@
1
  ---
2
  title: LISA Demo
3
- emoji: 👀
4
  colorFrom: yellow
5
- colorTo: yellow
6
  sdk: gradio
7
- sdk_version: 4.44.1
8
  app_file: app.py
9
  pinned: false
 
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
  title: LISA Demo
3
+ emoji:
4
  colorFrom: yellow
5
+ colorTo: red
6
  sdk: gradio
7
+ sdk_version: 4.17.0
8
  app_file: app.py
9
  pinned: false
10
+ startup_duration_timeout: 2h
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py ADDED
@@ -0,0 +1,687 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import time
3
+ import re
4
+ from pathlib import Path
5
+ from dotenv import load_dotenv
6
+ import pickle
7
+
8
+ from langchain_groq import ChatGroq
9
+ import gradio as gr
10
+
11
+ from huggingface_hub import login
12
+
13
+ from documents import load_pdf_as_docs, load_xml_as_docs
14
+
15
+ from memory_profiler import profile
16
+
17
+ from vectorestores import get_faiss_vectorestore
18
+
19
+ from langchain.vectorstores import FAISS
20
+
21
+ # For debug
22
+ # from langchain.globals import set_debug
23
+ # set_debug(True)
24
+
25
+
26
+ # Load and set env variables
27
+ load_dotenv()
28
+
29
+ HUGGINGFACEHUB_API_TOKEN = os.environ["HUGGINGFACEHUB_API_TOKEN"]
30
+ login(HUGGINGFACEHUB_API_TOKEN)
31
+ TAVILY_API_KEY = os.environ["TAVILY_API_KEY"] # Search engine
32
+
33
+ # Other settings
34
+ os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
35
+
36
+ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
37
+
38
+ database_root = "./data/db"
39
+ document_path = "./data/documents"
40
+
41
+ # Load cached db
42
+ def load_from_pickle(filename):
43
+ with open(filename, "rb") as file:
44
+ return pickle.load(file)
45
+
46
+ # Load docs
47
+ docs = load_from_pickle(os.path.join(database_root, "docs.pkl"))
48
+
49
+ # Load doc chunks
50
+ document_chunks = load_from_pickle(os.path.join(database_root, "docs_chunks.pkl"))
51
+
52
+ # Set embedding
53
+ from embeddings import get_jinaai_embeddings
54
+
55
+ embeddings = get_jinaai_embeddings(device="auto")
56
+ print("embedding loaded")
57
+
58
+ # Load vectorstore
59
+ vectorstore = FAISS.load_local(os.path.join(database_root, "faiss_index"), embeddings, allow_dangerous_deserialization=True)
60
+ print("vectorestore loaded")
61
+
62
+ # Load or create retrievers
63
+ from retrievers import get_parent_doc_retriever, get_rerank_retriever
64
+
65
+ docstore = load_from_pickle(os.path.join(database_root, "docstore.pkl"))
66
+ parent_doc_retriver = get_parent_doc_retriever(
67
+ docs, vectorstore, save_docstore=database_root, docstore=docstore, add_documents=False
68
+ )
69
+
70
+ # Hybrid-search
71
+ from langchain.retrievers import BM25Retriever, EnsembleRetriever
72
+
73
+ bm25_retriever = BM25Retriever.from_documents(
74
+ document_chunks, k=5
75
+ ) # 1/2 of dense retriever, experimental value
76
+
77
+ # Ensemble all above
78
+ ensemble_retriever = EnsembleRetriever(
79
+ retrievers=[bm25_retriever, parent_doc_retriver], weights=[0.5, 0.5]
80
+ )
81
+ # Reranker
82
+ from rerank import BgeRerank
83
+ reranker = BgeRerank()
84
+ rerank_retriever = get_rerank_retriever(ensemble_retriever, reranker)
85
+ print("rerank loaded")
86
+
87
+
88
+ # Create LLM model
89
+ # from llms import get_llm_openai_chat
90
+
91
+ #chat_model_name = os.environ["chat_model_name"] # llm server model name
92
+ #inference_server_url = os.environ["inference_server_url"] # openai-like api
93
+ #llm = get_llm_openai_chat(chat_model_name, inference_server_url)
94
+ llm = ChatGroq(temperature=0, model_name="llama-3.1-70b-versatile") # llama3-70b-8192
95
+
96
+ # # Tmp test
97
+ # from langchain.llms import HuggingFacePipeline
98
+ # from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
99
+ # model_path = "/mnt/localstorage/yinghan/llm/OpenHermes-2.5-Mistral-7B"
100
+ # model_path = "stabilityai/stablelm-2-zephyr-1_6b"
101
+ # model_path = "openbmb/MiniCPM-2B-dpo-bf16"
102
+ # model_path = "cognitivecomputations/dolphin-2_6-phi-2"
103
+ # model_path = "stabilityai/stablelm-3b-4e1t"
104
+
105
+ # model = AutoModelForCausalLM.from_pretrained(model_path, device_map="auto", trust_remote_code=True,)#, load_in_8bit=True)
106
+ # tokenizer = AutoTokenizer.from_pretrained(model_path)
107
+ # pipe = pipeline(
108
+ # "text-generation", model=model, tokenizer=tokenizer, max_new_tokens=1024, model_kwargs={"temperature":0}
109
+ # )
110
+ # llm = HuggingFacePipeline(pipeline=pipe)
111
+
112
+ # Tmp test for vllm -> do not use this, slow and not good
113
+ # from langchain.llms import VLLM
114
+ # llm = VLLM(model="mistralai/Mistral-7B-Instruct-v0.2", download_dir="/mnt/localstorage/yinghan/llm/vllms", dtype="half",
115
+ # trust_remote_code=True, tensor_parallel_size=2)#, tensor_parallel_size=4)
116
+
117
+ # # # Create conversation qa chain (Note: conversation is not supported yet)
118
+ from models import RAGChain
119
+
120
+ rag_chain = RAGChain()
121
+ lisa_qa_conversation = rag_chain.create(rerank_retriever, llm, add_citation=True)
122
+
123
+ # Web search rag chain
124
+ from langchain_community.retrievers import TavilySearchAPIRetriever
125
+ from langchain.chains import RetrievalQAWithSourcesChain
126
+ web_search_retriever = TavilySearchAPIRetriever(k=4)#, include_raw_content=True)#, include_raw_content=True)
127
+ web_qa_chain = RetrievalQAWithSourcesChain.from_chain_type(llm, retriever=web_search_retriever, return_source_documents=True)
128
+ print("chain loaded")
129
+
130
+
131
+ # Gradio utils
132
+ def check_input_text(text):
133
+ """Check input text (question)."""
134
+
135
+ if not text:
136
+ gr.Warning("Please input a question.")
137
+ raise TypeError # None input
138
+
139
+ return True
140
+
141
+
142
+ def add_text(history, text):
143
+ """Add conversation to history message."""
144
+
145
+ history = history + [(text, None)]
146
+ yield history, ""
147
+
148
+
149
+ def postprocess_remove_cite_misinfo(text, allowed_max_cite_num=6):
150
+ """Exp.-based removal of misinfo. of citations."""
151
+
152
+ # Remove trailing references at end of text
153
+ if "References:\n[" in text:
154
+ text = text.split("References:\n")[0]
155
+
156
+ source_ids = re.findall(r"(\[.*?\]+)", text) # List[Char]
157
+ pattern = r"(,*? *?\[.*?\]+)" # to deal with sth. like "[[20], [21–30]]"
158
+ print(f"source ids by re: {source_ids}")
159
+
160
+ # Define the custom function for replacement
161
+ def replace_and_increment(match):
162
+
163
+ match_str = match.group(1)
164
+ # print("match str", match_str)
165
+
166
+ # Delete anthing like [[10–14]]
167
+ if "–" in match_str or "-" in match_str:
168
+ return ""
169
+
170
+ # Delete anything like [i]
171
+ if "i" in match_str:
172
+ return ""
173
+
174
+ # Find number in match_str
175
+ # pattern = r'\[(\d+)\]'
176
+ pattern = r'(\d+)'
177
+ nums = re.findall(pattern, match_str)
178
+ if nums:
179
+ nums_list = []
180
+ for n in nums:
181
+ if int(n) <= allowed_max_cite_num: # maxmium num. of inputs for llm
182
+ nums_list.append('[[' + n + ']]')
183
+ #num = int(num[0])
184
+ else: # no number found
185
+ return ""
186
+
187
+ if re.search('^,', match_str):
188
+ return '<sup><span style="color:#F27F0C">' + ', ' + ", ".join(nums_list) + '</span></sup>'
189
+
190
+ return '<sup><span style="color:#F27F0C">' + ' ' + ", ".join(nums_list) + '</span></sup>'
191
+
192
+ # Replace all matches with itself plus 1
193
+ new_text = re.sub(pattern, replace_and_increment, text)
194
+
195
+ # Remove trailing citations like \n\n [[1]] [[2]
196
+ if "\n\n [" in new_text:
197
+ new_text = new_text.split("\n\n [")[0]
198
+ if "\n\n[" in new_text:
199
+ new_text = new_text.split("\n\n[")[0]
200
+
201
+ # Remove unnecessary white space etc.
202
+ new_text = new_text.strip()
203
+
204
+ return new_text
205
+
206
+ def postprocess_citation(text, source_docs):
207
+ """Postprocess text for extracting citations."""
208
+ # return "test putout for debug {}".format(xxx)
209
+
210
+ source_ids = re.findall(r"\[(\d*)\]", text) # List[Char]
211
+ # print(f"source ids by re: {source_ids}")
212
+ # source_ids = re.findall(r"\[\[(.*?)\]\]", text) # List[Char]
213
+ aligned_source_ids = list(map(lambda x: int(x) - 1, source_ids)) # shift index-1
214
+ # print(f"souce ids generated by llm: {aligned_source_ids}")
215
+ # Filter fake souce ids as LLM might generate false source ids
216
+ candidate_source_ids = list(range(len(source_docs)))
217
+ filtered_source_ids = set(
218
+ [i for i in aligned_source_ids if i in candidate_source_ids]
219
+ )
220
+ filtered_docs = [source_docs[i] for i in filtered_source_ids]
221
+ output_markdown = "" # """**References**\n\n"""
222
+ for i, d in zip(filtered_source_ids, filtered_docs):
223
+ # * [[0]]: source: paper1
224
+ # > some text
225
+ index = i + 1
226
+ source = d.metadata["source"]
227
+ content = d.page_content.strip().replace("\n", " ")
228
+ source_info = f"<b>[[{index}]] {source}</b>"
229
+ item = f"""
230
+ <details>
231
+ <summary>{source_info}</summary>
232
+
233
+ <blockquote cite="">
234
+ <p>{content}</p>
235
+ </blockquote>
236
+ </details>
237
+ """
238
+ # item = f"""
239
+ # <details> <summary>{source_info}</summary>\n
240
+ # > {content}
241
+ # </details>\n
242
+ # """ # collapsible section (fold)
243
+ # item = f"**[[{index}]] source: {source}**\n> {content}\n\n" # shift index+1
244
+ output_markdown += item
245
+ #print("in add citaiton funciton output markdonw", output_markdown)
246
+ #output_markdown = "this is just a test before real markdonw pops out."
247
+ return output_markdown
248
+
249
+
250
+ def postprocess_web_citation(text, qa_result):
251
+ """Postprocess text for extracting web citations."""
252
+ # Simple implementation, to be fixed TODO
253
+
254
+ if qa_result["sources"]:#source_documents
255
+ # '<https://www.extremetech.com/energy/what-is-a-solid-state-battery-how-they-work-explained>,'
256
+ web_sources = qa_result["sources"].split(",")
257
+ web_sources = [s.strip().replace('>', '').replace('<', '').replace(',', '') for s in web_sources] # simple cleaning
258
+ else: # if no qa_results["sources"]
259
+ web_sources = [doc.metadata["source"] for doc in qa_result["source_documents"]]
260
+ output_markdown = "" # """**References**\n\n"""
261
+ for i, d in enumerate(web_sources):
262
+ index = i + 1
263
+ source = d
264
+ item = f"""
265
+ <p><a href="{source}/" target="_blank" rel="noopener noreferrer">[{index}]. {source}</a></p>
266
+
267
+ """
268
+ output_markdown += item
269
+ return output_markdown
270
+
271
+
272
+ def bot_lisa(history, flag_web_search):
273
+ """Get answer from LLM."""
274
+
275
+ if not flag_web_search: # use internal-database
276
+ result = lisa_qa_conversation(
277
+ {
278
+ "question": history[-1][0], # or "query" if RetrievalQA
279
+ "chat_history": history[:-1],
280
+ }
281
+ )
282
+ if result is None: # handle error case
283
+ raise gr.Error("Sorry, failed to get answer from LLM, please try again.")
284
+ # return "", "something wrong with anwswer, please try again"
285
+
286
+ print(f"Answer: {result['answer']}")
287
+ print(f"Source document: {result['source_documents']}") # for debug
288
+ # Citation post-processing
289
+ answer_text = result["answer"].strip()
290
+ # Remove misinfo in text
291
+ answer_text = postprocess_remove_cite_misinfo(answer_text)
292
+ # print("processed answer after misinfo remove", answer_text)
293
+
294
+ citation_text = postprocess_citation(answer_text, result["source_documents"])
295
+ # print("citation_text", citation_text)
296
+ else: # use web search
297
+ result = web_qa_chain(
298
+ {
299
+ "question": history[-1][0], # or "query" if RetrievalQA
300
+ # "chat_history": history[:-1],
301
+ }
302
+ )
303
+ if result is None: # handle error case
304
+ raise gr.Error("Sorry, failed to get answer from LLM, please try again.")
305
+ # return "", "something wrong with anwswer, please try again"
306
+
307
+ answer_text = result["answer"].strip()
308
+ citation_text = postprocess_web_citation(answer_text, result)
309
+
310
+ # # no stream style
311
+ # history[-1][1] = answer_text
312
+ # return history, citation_text
313
+ # fake stream style
314
+ history[-1][1] = "" # Fake stream, TODO: implement streaming
315
+ for character in answer_text:
316
+ time.sleep(0.002)
317
+ history[-1][1] += character
318
+ yield history, citation_text
319
+
320
+
321
+ def bot(history, qa_conversation):
322
+ """Get answer from LLM, so custom document."""
323
+
324
+ # print("id of qa conver", id(qa_conversation)) # for debug
325
+ if qa_conversation is None:
326
+ gr.Warning("Please upload a document first.")
327
+
328
+ result = qa_conversation(
329
+ {
330
+ "question": history[-1][0], # or "query" if RetrievalQA
331
+ "chat_history": history[:-1],
332
+ }
333
+ )
334
+
335
+ if result is None: # handle error case
336
+ return "", ""
337
+
338
+ print(f"Source document: {result['source_documents']}") # for debug
339
+ answer_text = result["answer"].strip()
340
+ # Remove misinfo in text
341
+ answer_text = postprocess_remove_cite_misinfo(answer_text)
342
+
343
+ citation_text = postprocess_citation(answer_text, result["source_documents"])
344
+
345
+ history[-1][1] = "" # Fake stream, TODO: implement streaming
346
+ for character in answer_text:
347
+ time.sleep(0.002)
348
+ history[-1][1] += character
349
+ yield history, citation_text
350
+
351
+
352
+ @profile
353
+ def document_changes(doc_path):
354
+ """Parse user document."""
355
+
356
+ max_file_num = 3
357
+ # Ref: https://huggingface.co/spaces/fffiloni/langchain-chat-with-pdf
358
+ if doc_path is None:
359
+ gr.Warning("Please choose a document first and wait until uploaded.")
360
+ return (
361
+ "Please choose a document and wait until uploaded.",
362
+ None,
363
+ ) # for langchain_status, qa_conversation
364
+
365
+ print("now reading document")
366
+ print(f"file is located at {doc_path[0]}")
367
+
368
+ documents = []
369
+ for doc in doc_path[:max_file_num]:
370
+ file_extension = Path(doc).suffix
371
+ if file_extension == ".pdf":
372
+ documents.extend(load_pdf_as_docs(doc))
373
+ elif file_extension == ".xml":
374
+ documents.extend(load_xml_as_docs(doc))
375
+
376
+ # embeddings = HuggingFaceEmbeddings()
377
+
378
+ print("now creating vectordatabase")
379
+
380
+ vectorstore = get_faiss_vectorestore(embeddings)
381
+ parent_doc_retriever = get_parent_doc_retriever(documents, vectorstore)
382
+ rerank_retriever = get_rerank_retriever(parent_doc_retriever, reranker)
383
+
384
+ print("now getting llm model")
385
+
386
+ #chat_model_name = "openchat_3.5"
387
+ # inference_server_url = "http://172.22.212.10:8080/v1"
388
+ # llm = get_llm_openai_chat(chat_model_name, inference_server_url)
389
+ llm = ChatGroq(temperature=0, model_name="llama-3.1-70b-versatile") # llama3-70b-8192
390
+ # llm = HuggingFaceHub(repo_id=repo_id, model_kwargs={"temperature":0.1, "max_new_tokens":250})
391
+ rag_chain = RAGChain()
392
+
393
+ # global qa_conversation
394
+ qa_conversation = rag_chain.create(rerank_retriever, llm, add_citation=True)
395
+
396
+ # doc_qa = qa_conversation # RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=retriever, return_source_documents=True)
397
+ # qa_conversation = ConversationalRetrievalChain.from_chain_type(llm=llm, chain_type="stuff", retriever=retriever, return_source_documents=True)
398
+
399
+ file_name = Path(doc_path[0]).name # First file
400
+ return f"Ready for {file_name} etc.", qa_conversation # , db, retriever
401
+
402
+
403
+ # Main gradio UI
404
+ def main():
405
+ """Gradio interface."""
406
+
407
+ with gr.Blocks() as demo:
408
+ ######################################################################
409
+ # LISA chat tab
410
+ # Title info
411
+ gr.Markdown("## LISA - Lithium Ion Solid-state Assistant")
412
+ gr.Markdown("""
413
+ Q&A research assistant for efficient Knowledge Management not only in Battery Science.
414
+ Based on RAG-architecture and powered by Large Language Models (LLMs).""")
415
+
416
+ with gr.Tab("LISA ⚡"):
417
+ with gr.Row():
418
+ with gr.Column(scale=7):
419
+ # Chatbot
420
+ chatbot = gr.Chatbot(
421
+ [],
422
+ elem_id="chatbot",
423
+ label="Document Assistant",
424
+ bubble_full_width=False,
425
+ show_copy_button=True,
426
+ #likeable=True,
427
+ ) # .style(height=750)
428
+
429
+ user_txt = gr.Textbox(
430
+ label="Question", # show_label=False,
431
+ placeholder="Type in the question and press Enter/click Submit",
432
+ ) # .style(container=False)
433
+
434
+ with gr.Accordion("Advanced", open=False):
435
+ flag_web_search = gr.Checkbox(label="Search web", info="Search information from Internet")
436
+
437
+ with gr.Row():
438
+ #with gr.Column(scale=8):
439
+ with gr.Column(scale=1):
440
+ submit_btn = gr.Button("Submit", variant="primary")
441
+ with gr.Column(scale=1):
442
+ clear_btn = gr.Button("Clear", variant="stop")
443
+
444
+ # citations test place
445
+ # doc_citation = gr.Markdown("References used in answering the question will be displayed below.")
446
+ # Examples
447
+ gr.Examples(
448
+ examples=[
449
+ "Please name two common solid electrolytes.",
450
+ "Please name two common oxide solid electrolytes.",
451
+ "Please tell me what is solid-state battery.",
452
+ "How to synthesize gc-LPSC?",
453
+ "Please tell me the purpose of Kadi4Mat.",
454
+ "Who is working on Kadi4Mat?",
455
+ "Can you recommend a paper to get a deeper understanding of Kadi4Mat?",
456
+ # "How to synthesize gc-LPSC, e.g., glass-ceramic Li5.5PS4.5Cl1.5?",
457
+ ],
458
+ inputs=user_txt,
459
+ outputs=chatbot,
460
+ fn=add_text,
461
+ label="Try asking...",
462
+ # cache_examples=True,
463
+ cache_examples=False,
464
+ examples_per_page=3,
465
+ )
466
+
467
+ # with gr.Accordion("References", open=True):
468
+ # Reference (citations) and other settings
469
+ with gr.Column(scale=3):
470
+ with gr.Tab("References"):
471
+ doc_citation = gr.HTML("<p>References used in answering the question will be displayed below.</p>")# gr.Markdown("References used in answering the question will be displayed below.")
472
+ # gr.Markdown("nothing test")
473
+ with gr.Tab("Setting"):
474
+ # checkbox for allowing web search
475
+ # flag_web_search = gr.Checkbox(label="Search web", info="Search information from Internet")
476
+ gr.Markdown("More in DEV...")
477
+
478
+ # Manage functions
479
+ user_txt.submit(check_input_text, user_txt, None).success(
480
+ add_text, [chatbot, user_txt], [chatbot, user_txt]
481
+ ).then(bot_lisa, [chatbot, flag_web_search], [chatbot, doc_citation])
482
+
483
+ submit_btn.click(check_input_text, user_txt, None).success(
484
+ add_text,
485
+ [chatbot, user_txt],
486
+ [chatbot, user_txt],
487
+ # concurrency_limit=8,
488
+ # queue=False,
489
+ ).then(bot_lisa, [chatbot, flag_web_search], [chatbot, doc_citation])
490
+
491
+ clear_btn.click(lambda: None, None, chatbot, queue=False)
492
+
493
+ ######################################################################
494
+
495
+ ######################################################################
496
+ # Document-based QA
497
+
498
+ with gr.Tab("Upload document 📚"):
499
+ qa_conversation = gr.State("placeholder", time_to_live=3600) # clean state after 1h, is , is time_to_live=3600 needed?
500
+
501
+ with gr.Row():
502
+ with gr.Column(scale=7, variant="chat_panel"):
503
+ chatbot_docqa = gr.Chatbot(
504
+ [],
505
+ elem_id="chatbot_docqa",
506
+ label="Document Assistant",
507
+ show_copy_button=True,
508
+ likeable=True,
509
+ )
510
+ docqa_question = gr.Textbox(
511
+ label="Question",
512
+ placeholder="Type in the question and press Enter/click Submit",
513
+ )
514
+ with gr.Row():
515
+ with gr.Column(scale=50):
516
+ docqa_submit_btn = gr.Button("Submit", variant="primary")
517
+ with gr.Column(scale=50):
518
+ docqa_clear_btn = gr.Button("Clear", variant="stop")
519
+
520
+ gr.Examples(
521
+ examples=[
522
+ "Summarize the paper",
523
+ "Summarize the paper in 3 bullet points",
524
+ # "Explain Abstract of this paper in 2 lines",
525
+ "What are the contributions of this paper",
526
+ "Explain the practical implications of this paper",
527
+ "Methods used in this paper",
528
+ "What data has been used in this paper",
529
+ "Results of the paper",
530
+ "Conclusions from the paper",
531
+ "Limitations of this paper",
532
+ "Future works suggested in this paper",
533
+ ],
534
+ inputs=docqa_question,
535
+ outputs=chatbot_docqa,
536
+ fn=add_text,
537
+ label="Example questions for single document.",
538
+ # cache_examples=True,
539
+ cache_examples=False,
540
+ examples_per_page=4,
541
+ )
542
+
543
+ # Load file, reference (citations) and other settings
544
+ with gr.Column(scale=3):
545
+ with gr.Tab("Load"):
546
+ # with gr.Column(scale=3, variant="load_file_panel"):
547
+ with gr.Row():
548
+ gr.HTML(
549
+ "Upload pdf/xml file(s), click the Load file button. After preprocessing, you can start asking questions about the document. (Please do not share sensitive document)"
550
+ )
551
+ with gr.Row():
552
+ uploaded_doc = gr.File(
553
+ label="Upload pdf/xml (max. 3) file(s)",
554
+ file_count="multiple",
555
+ file_types=[".pdf", ".xml"],
556
+ type="filepath",
557
+ height=100,
558
+ )
559
+ with gr.Row():
560
+ langchain_status = gr.Textbox(
561
+ label="Status", placeholder="", interactive=False
562
+ )
563
+ load_document = gr.Button("Load file")
564
+ with gr.Tab("References"):
565
+ doc_citation_user_doc = gr.HTML("References used in answering the question will be displayed below.")
566
+ with gr.Tab("Setting"):
567
+ gr.Markdown("More in DEV...")
568
+
569
+ # with gr.Row():
570
+ # # with gr.Column(scale=3, min_width=357, variant="panel"):
571
+ # with gr.Column(scale=3, variant="load_file_panel"):
572
+ # with gr.Row():
573
+ # gr.HTML(
574
+ # "Upload pdf/xml file(s), click the Load file button. After preprocessing, you can start asking questions about the document."
575
+ # )
576
+ # with gr.Row():
577
+ # uploaded_doc = gr.File(
578
+ # label="Upload pdf/xml (max. 3) file(s)",
579
+ # file_count="multiple",
580
+ # file_types=[".pdf", ".xml"],
581
+ # type="filepath",
582
+ # height=100,
583
+ # )
584
+
585
+ # repo_id = gr.Dropdown(
586
+ # label="LLM",
587
+ # choices=[
588
+ # "default", # open hermes mistral 7b
589
+ # "more-on-the-way",
590
+ # # "OpenAssistant/oasst-sft-1-pythia-12b",
591
+ # # "bigscience/bloomz",
592
+ # ],
593
+ # value="default",
594
+ # )
595
+
596
+
597
+ # pdf_loader = gr_PDF(label="Document")
598
+
599
+ # repo_id.change(
600
+ # pdf_changes,
601
+ # inputs=[uploaded_doc, repo_id],
602
+ # outputs=[langchain_status],
603
+ # queue=False,
604
+ # )
605
+
606
+ load_document.click(
607
+ document_changes,
608
+ inputs=[uploaded_doc], # , repo_id],
609
+ outputs=[
610
+ langchain_status,
611
+ qa_conversation,
612
+ ], # , docqa_db, docqa_retriever],
613
+ queue=False,
614
+ )
615
+
616
+ docqa_question.submit(check_input_text, docqa_question).success(
617
+ add_text, [chatbot_docqa, docqa_question], [chatbot_docqa, docqa_question]
618
+ ).then(bot, [chatbot_docqa, qa_conversation], [chatbot_docqa, doc_citation_user_doc])
619
+
620
+ docqa_submit_btn.click(check_input_text, docqa_question).success(
621
+ add_text, [chatbot_docqa, docqa_question], [chatbot_docqa, docqa_question]
622
+ ).then(bot, [chatbot_docqa, qa_conversation], [chatbot_docqa, doc_citation_user_doc])
623
+
624
+ # preview tab
625
+ with gr.Tab("Preview feature 🔬"):
626
+ with gr.Tab("Vision LM 🖼"):
627
+ vision_tmp_link = "https://kadi-iam-lisa-vlm.hf.space/" # vision model link
628
+ with gr.Blocks(css="""footer {visibility: hidden};""") as preview_tab:
629
+ gr.HTML("""<iframe src="{}" style="width:100%; height:1024px; overflow:auto"></iframe>""".format(vision_tmp_link))
630
+ # gr.Markdown("placeholder")
631
+
632
+ # with gr.Tab("Knowledge Graph RAG 🔎"):
633
+ # graph_tmp_link = "https://ea0feb6eb6495e8b2d.gradio.live/" # vision model link
634
+ # with gr.Blocks(css="""footer {visibility: hidden};""") as preview_tab:
635
+ # gr.HTML("""<iframe src="{}" style="width:100%; height:1024px; overflow:auto"></iframe>""".format(graph_tmp_link))
636
+
637
+ # About information
638
+ with gr.Tab("About 📝"):
639
+ with gr.Tab("Dev. info"):
640
+ gr.Markdown(
641
+ """
642
+ This system is being developed by the [Kadi Group at IAM-MMS, KIT](https://kadi.iam.kit.edu), in collaboration with various teams with different scientific backgrounds.
643
+
644
+ Changelog:
645
+
646
+ - 02-10-2024: Code cleaning, release code soon
647
+ - 26-09-2024: Switch Vision-LLM to Mistral via API
648
+ - 31-08-2024: Make document parsing as a preprocessing step and cache vector-database
649
+ - 31-05-2024: Add Vision-LLM and Graph-RAG (*preview*)
650
+ - 21-05-2024: Add web search in setting (*experimental*)
651
+ - 15-03-2024: Add evaluation and improve citation feature
652
+ - 20-02-2024: Add citation feature (*experimental*)
653
+ - 16-02-2024: Add support for xml file
654
+ - 12-02-2024: Set demo on huggingface
655
+ - 16-01-2024: Build first demo version
656
+ - 23-11-2023: Draft concept
657
+
658
+
659
+ Dev:
660
+
661
+ - Metadata parsing
662
+ - More robust citation feature
663
+ - Conversational chat
664
+
665
+
666
+ Current limitations:
667
+
668
+ - The conversational chat (chat with history context) is not supported yet
669
+ - Only 3 files are allowed to upload for testing
670
+
671
+ *Notes: The model may produce incorrect statements. Users should treat these outputs as suggestions or starting points, not as definitive or accurate facts.
672
+ """
673
+ )
674
+
675
+ with gr.Tab("What's included?"):
676
+ from paper_list import paper_list_str
677
+ gr.Markdown(f"Currently, LISA includes the following open/free access pulications/documents/websites:\n\n {paper_list_str}")
678
+
679
+ # pdf_loader.change(pdf_changes, inputs=[pdf_loader, repo_id], outputs=[langchain_status], queue=False)
680
+
681
+ ######################################################################
682
+
683
+ demo.queue(max_size=8, default_concurrency_limit=4).launch(share=True)
684
+
685
+
686
+ if __name__ == "__main__":
687
+ main()
data/db/.gitattributes ADDED
@@ -0,0 +1 @@
 
 
1
+ *.pkl filter=lfs diff=lfs merge=lfs -text
data/db/docs.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0720810b800c37f4a239f3da9cabcba1769a307f6a52a014e431afc380e4bee
3
+ size 10187843
data/db/docs_chunks.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0720810b800c37f4a239f3da9cabcba1769a307f6a52a014e431afc380e4bee
3
+ size 10187843
data/db/docstore.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eda6270d9478ccfed60f9f41a35d9b2d3acb2d8037b79a3102357f211d64399f
3
+ size 13404384
data/db/faiss_index/.gitattributes ADDED
@@ -0,0 +1 @@
 
 
1
+ *.faiss filter=lfs diff=lfs merge=lfs -text
data/db/faiss_index/index.faiss ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:413aa6362348e5213e56245efe0e579bf95d4fb16a3b9cd1db71c1df71669a1d
3
+ size 65445933
data/db/faiss_index/index.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:171cebcaf44bfaf014e6c84ff217298484dd14fbaa7ee812205819cef27c8df1
3
+ size 17735529
data/db/place_for_doc_cache.md ADDED
@@ -0,0 +1 @@
 
 
1
+ pkl file is used to store some cache files for RAG chatbot. Be careful with pkl files for potential secure reason.
data/documents/.gitattributes ADDED
@@ -0,0 +1 @@
 
 
1
+ *.pdf filter=lfs diff=lfs merge=lfs -text
data/documents/Brandt et al_2021_Kadi4Mat.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:204bdf7151f215d73aee588c4c16edf2c7025a776b723ca11e77e453a4d54d00
3
+ size 2224830
data/documents/Brandt et al_2022_Managing FAIR Tribological Data Using Kadi4Mat.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:813cbd3a76ee303a6d27c15624ffa5444db766289ea0c9e8a5907b908ed78e34
3
+ size 2725716
data/documents/Brandt et al_2024_Kadi_info_page.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:573582bd892429fe48e36c782a5a59ac9d06560158576d523a93fa9d6a217cf5
3
+ size 116571
documents.py ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import cohere
3
+ import getpass
4
+ from dotenv import load_dotenv
5
+ from langchain.document_loaders import (
6
+ TextLoader,
7
+ UnstructuredHTMLLoader,
8
+ PyPDFLoader,
9
+ PyMuPDFLoader,
10
+ PyPDFDirectoryLoader,
11
+ )
12
+ from langchain.text_splitter import CharacterTextSplitter
13
+ from langchain.embeddings import HuggingFaceEmbeddings
14
+ from langchain.vectorstores import FAISS, Chroma
15
+ from langchain.memory import ConversationBufferMemory
16
+ from langchain.chains import ConversationalRetrievalChain
17
+ from langchain.llms import HuggingFaceTextGenInference
18
+
19
+ from langchain.text_splitter import (
20
+ CharacterTextSplitter,
21
+ RecursiveCharacterTextSplitter,
22
+ SpacyTextSplitter,
23
+ )
24
+ import shutil
25
+
26
+ def load_pdf_as_docs(pdf_path, loader_module=None, load_kwargs=None):
27
+ """Load and parse pdf file(s)."""
28
+
29
+ if pdf_path.endswith('.pdf'): # single file
30
+ pdf_docs = [pdf_path]
31
+ else: # a directory
32
+ pdf_docs = [os.path.join(pdf_path, f) for f in os.listdir(pdf_path) if f.endswith('.pdf')]
33
+
34
+ if load_kwargs is None:
35
+ load_kwargs = {}
36
+
37
+ docs = []
38
+ if loader_module is None: # set pdf loader
39
+ loader_module = PyMuPDFLoader
40
+ for pdf in pdf_docs:
41
+ loader = loader_module(pdf, **load_kwargs)
42
+ doc = loader.load()
43
+ docs.extend(doc)
44
+
45
+ return docs
46
+
47
+ def load_xml_as_docs(xml_path, loader_module=None, load_kwargs=None):
48
+ """Load and parse xml file(s)."""
49
+
50
+ from bs4 import BeautifulSoup
51
+ from unstructured.cleaners.core import group_broken_paragraphs
52
+
53
+ if xml_path.endswith('.xml'): # single file
54
+ xml_docs = [xml_path]
55
+ else: # a directory
56
+ xml_docs = [os.path.join(xml_path, f) for f in os.listdir(xml_path) if f.endswith('.xml')]
57
+
58
+ if load_kwargs is None:
59
+ load_kwargs = {}
60
+
61
+ docs = []
62
+ for xml_file in xml_docs:
63
+ # print("now reading file...")
64
+ with open(xml_file) as fp:
65
+ soup = BeautifulSoup(fp, features="xml") # txt is simply the a string with your XML file
66
+ pageText = soup.findAll(string=True)
67
+ parsed_text = '\n'.join(pageText) # or " ".join, seems similar
68
+ # # Clean text
69
+ parsed_text_grouped = group_broken_paragraphs(parsed_text)
70
+
71
+ # get metadata
72
+ try:
73
+ from lxml import etree as ET
74
+ tree = ET.parse(xml_file)
75
+
76
+ # Define namespace
77
+ ns = {"tei": "http://www.tei-c.org/ns/1.0"}
78
+ # Read Author personal names as an example
79
+ pers_name_elements = tree.xpath("tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:author/tei:persName", namespaces=ns)
80
+ first_per = pers_name_elements[0].text
81
+ author_info = first_per + " et al"
82
+
83
+ title_elements = tree.xpath("tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:title", namespaces=ns)
84
+ title = title_elements[0].text
85
+
86
+ # Combine source info
87
+ source_info = "_".join([author_info, title])
88
+ except:
89
+ source_info = "unknown"
90
+
91
+ # maybe even better TODO: discuss with Jens
92
+ #first_author = soup.find("author")
93
+ #publication_year = soup.find("date", attrs={'type': 'published'})
94
+ #title = soup.find("title")
95
+ # source_info = [first_author, publication_year, title]
96
+ #source_info_str = "_".join([info.text.strip() if info is not None else "unknown" for info in source_info])
97
+
98
+ from langchain.docstore.document import Document
99
+ doc = [Document(page_content=parsed_text_grouped, metadata={"source": source_info})]#, metadata={"source": "local"})
100
+
101
+ docs.extend(doc)
102
+
103
+ return docs
104
+
105
+
106
+ def get_doc_chunks(docs, splitter=None):
107
+ """Split docs into chunks."""
108
+
109
+ if splitter is None:
110
+ #splitter = RecursiveCharacterTextSplitter(
111
+ # # separators=["\n\n", "\n"], chunk_size=1024, chunk_overlap=256
112
+ # separators=["\n\n", "\n"], chunk_size=256, chunk_overlap=128
113
+ #)
114
+ splitter = SpacyTextSplitter.from_tiktoken_encoder(
115
+ chunk_size=512,
116
+ chunk_overlap=256,
117
+ )
118
+ chunks = splitter.split_documents(docs)
119
+
120
+ return chunks
121
+
122
+
123
+ def persist_vectorstore(document_chunks, embeddings, persist_directory="db", overwrite=False):
124
+ # embeddings = HuggingFaceEmbeddings(model_name="sentence-transformers/all-mpnet-base-v2")
125
+ # vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
126
+ if overwrite:
127
+ shutil.rmtree(persist_directory) # Empty and reset db
128
+ db = Chroma.from_documents(documents=document_chunks, embedding=embeddings, persist_directory=persist_directory)
129
+ # db.delete_collection()
130
+ db.persist()
131
+ # db = None
132
+ # db = Chroma(persist_directory="db", embedding_function = embeddings, client_settings=CHROMA_SETTINGS)
133
+ # vectorstore = FAISS.from_documents(documents=document_chunks, embedding=embeddings)
134
+ return db
135
+
136
+
137
+ class VectorstoreManager:
138
+
139
+ def __init__(self):
140
+ self.vectorstore_class = Chroma
141
+
142
+ def create_db(self, embeddings):
143
+ db = self.vectorstore_class(embedding_function=embeddings)
144
+
145
+ self.db = db
146
+ return db
147
+
148
+
149
+ def load_db(self, persist_directory, embeddings):
150
+ """Load local vectorestore."""
151
+
152
+ db = self.vectorstore_class(persist_directory=persist_directory, embedding_function=embeddings)
153
+ self.db = db
154
+
155
+ return db
156
+
157
+ def create_db_from_documents(self, document_chunks, embeddings, persist_directory="db", overwrite=False):
158
+ """Create db from documents."""
159
+
160
+ if overwrite:
161
+ shutil.rmtree(persist_directory) # Empty and reset db
162
+ db = self.vectorstore_class.from_documents(documents=document_chunks, embedding=embeddings, persist_directory=persist_directory)
163
+ self.db = db
164
+
165
+ return db
166
+
167
+ def persist_db(self, persist_directory="db"):
168
+ """Persist db."""
169
+
170
+ assert self.db
171
+ self.db.persist() # Chroma
172
+
173
+ class RetrieverManager:
174
+ # some other retrievers Using Advanced Retrievers in LangChain https://www.comet.com/site/blog/using-advanced-retrievers-in-langchain/
175
+
176
+ def __init__(self, vectorstore, k=10):
177
+
178
+ self.vectorstore = vectorstore
179
+ self.retriever = vectorstore.as_retriever(search_kwargs={"k": k}) #search_kwargs={"k": 8}),
180
+
181
+ def get_rerank_retriver(self, base_retriever=None):
182
+
183
+ if base_retriever is None:
184
+ base_retriever = self.retriever
185
+ # with rerank
186
+ from rerank import BgeRerank
187
+ from langchain.retrievers import ContextualCompressionRetriever
188
+
189
+ compressor = BgeRerank()
190
+ compression_retriever = ContextualCompressionRetriever(
191
+ base_compressor=compressor, base_retriever=base_retriever
192
+ )
193
+
194
+ return compression_retriever
195
+
196
+ def get_parent_doc_retriver(self, documents, store_file="./store_location"):
197
+ # TODO need better design
198
+ # Ref: explain how it works: https://clusteredbytes.pages.dev/posts/2023/langchain-parent-document-retriever/
199
+ from langchain.storage.file_system import LocalFileStore
200
+ from langchain.storage import InMemoryStore
201
+ from langchain.storage._lc_store import create_kv_docstore
202
+ from langchain.retrievers import ParentDocumentRetriever
203
+ # Ref: https://stackoverflow.com/questions/77385587/persist-parentdocumentretriever-of-langchain
204
+ # fs = LocalFileStore("./store_location")
205
+ # store = create_kv_docstore(fs)
206
+ docstore = InMemoryStore()
207
+
208
+ # TODO: how to better set this?
209
+ parent_splitter = RecursiveCharacterTextSplitter(separators=["\n\n", "\n"], chunk_size=1024, chunk_overlap=256)
210
+ child_splitter = RecursiveCharacterTextSplitter(separators=["\n\n", "\n"], chunk_size=256, chunk_overlap=128)
211
+
212
+ retriever = ParentDocumentRetriever(
213
+ vectorstore=self.vectorstore,
214
+ docstore=docstore,
215
+ child_splitter=child_splitter,
216
+ parent_splitter=parent_splitter,
217
+ search_kwargs={"k":10} # Better settings?
218
+ )
219
+ retriever.add_documents(documents)#, ids=None)
220
+
221
+ return retriever
embeddings.py ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import torch
3
+ from langchain.embeddings import HuggingFaceEmbeddings
4
+
5
+
6
+ def get_hf_embeddings(model_name=None):
7
+ """Get huggingface embedding."""
8
+
9
+ if model_name is None:
10
+ # Some candiates:
11
+ # "BAAI/bge-m3" (good, though large and slow)
12
+ # "BAAI/bge-base-en-v1.5" -> seems not that good with current settings
13
+ # "sentence-transformers/all-mpnet-base-v2", "maidalun1020/bce-embedding-base_v1", "intfloat/multilingual-e5-large"
14
+ # Ref: https://huggingface.co/spaces/mteb/leaderboard, https://huggingface.co/maidalun1020/bce-embedding-base_v1
15
+ model_name = "BAAI/bge-large-en-v1.5" # or ""
16
+
17
+ embeddings = HuggingFaceEmbeddings(model_name=model_name)
18
+
19
+ return embeddings
20
+
21
+
22
+ def get_jinaai_embeddings(model_name="jinaai/jina-embeddings-v2-base-en", device="auto"):
23
+ """Get jinnai embedding."""
24
+
25
+ # device: cpu or cuda
26
+ if device == "auto":
27
+ device = "cuda" if torch.cuda.is_available() else "cpu"
28
+ # For jinaai. Ref: https://github.com/langchain-ai/langchain/issues/6080
29
+ from transformers import AutoModel
30
+ model = AutoModel.from_pretrained(model_name, trust_remote_code=True) # -> will yield error, need bug fixing
31
+
32
+ model_name = model_name
33
+ model_kwargs = {'device': device, "trust_remote_code": True}
34
+ embeddings = HuggingFaceEmbeddings(
35
+ model_name=model_name,
36
+ model_kwargs=model_kwargs,
37
+ )
38
+
39
+ return embeddings
llms.py ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # from langchain import HuggingFaceHub, LLMChain
2
+ from langchain.chains import LLMChain
3
+ from langchain.llms import HuggingFacePipeline
4
+ from transformers import (
5
+ AutoModelForCausalLM,
6
+ AutoTokenizer,
7
+ pipeline,
8
+ T5Tokenizer,
9
+ T5ForConditionalGeneration,
10
+ GPT2TokenizerFast,
11
+ )
12
+ from transformers import LlamaForCausalLM, AutoModelForCausalLM, LlamaTokenizer
13
+ from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
14
+ from langchain.prompts import SystemMessagePromptTemplate, HumanMessagePromptTemplate, ChatPromptTemplate, PromptTemplate
15
+
16
+ # model_path = "/mnt/localstorage/yinghan/llm/orca_mini_v3_13b"
17
+ # model = LlamaForCausalLM.from_pretrained(model_path, device_map="auto")#, load_in_8bit=True)
18
+ # tokenizer = AutoTokenizer.from_pretrained(model_path)
19
+ from langchain.chat_models import ChatOpenAI
20
+ # from langchain_openai import ChatOpenAI
21
+ # from langchain_openai import ChatOpenAI
22
+ from langchain.embeddings.openai import OpenAIEmbeddings
23
+ from langchain.embeddings import HuggingFaceEmbeddings
24
+ from langchain.vectorstores import Chroma
25
+ from langchain.text_splitter import (
26
+ CharacterTextSplitter,
27
+ RecursiveCharacterTextSplitter,
28
+ )
29
+ from langchain.document_loaders import TextLoader, UnstructuredHTMLLoader, PyPDFLoader
30
+ from langchain.chains.retrieval_qa.base import RetrievalQA
31
+ from langchain.llms import HuggingFaceHub
32
+ from dotenv import load_dotenv
33
+ from langchain.llms import HuggingFaceTextGenInference
34
+ from langchain.chains.question_answering import load_qa_chain
35
+ from langchain.chains import ConversationalRetrievalChain
36
+ from langchain.chains.conversation.memory import (
37
+ ConversationBufferMemory,
38
+ ConversationBufferWindowMemory,
39
+ )
40
+
41
+
42
+ def get_llm_hf_online(inference_api_url=""):
43
+ """Get LLM using huggingface inference."""
44
+
45
+ if not inference_api_url: # default api url
46
+ inference_api_url = (
47
+ "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta"
48
+ )
49
+
50
+ llm = HuggingFaceTextGenInference(
51
+ # cache=None, # Optional: Cache verwenden oder nicht
52
+ verbose=True, # Provides detailed logs of operation
53
+ # callbacks=[StreamingStdOutCallbackHandler()], # Handeling Streams
54
+ max_new_tokens=1024, # Maximum number of token that can be generated.
55
+ # top_k=2, # Die Anzahl der Top-K Tokens, die beim Generieren berücksichtigt werden sollen
56
+ top_p=0.95, # Threshold for controlling randomness in text generation process.
57
+ typical_p=0.95, #
58
+ temperature=0.1, # For choosing probable words.
59
+ # repetition_penalty=None, # Wiederholungsstrafe beim Generieren
60
+ # truncate=None, # Schneidet die Eingabe-Tokens auf die gegebene Größe
61
+ # stop_sequences=None, # Eine Liste von Stop-Sequenzen beim Generieren
62
+ inference_server_url=inference_api_url, # URL des Inferenzservers
63
+ timeout=10, # Timeout for connection with the url
64
+ # streaming=True, # Streaming the answer
65
+ )
66
+
67
+ return llm
68
+
69
+
70
+ def get_llm_hf_local(model_path):
71
+ """Get local LLM."""
72
+
73
+ # model_path = "/mnt/localstorage/yinghan/llm/orca_mini_v3_13b"
74
+ # model_path = "/mnt/localstorage/yinghan/llm/zephyr-7b-beta"
75
+ model = LlamaForCausalLM.from_pretrained( # or AutoModelForCausalLM. TODO: which is better? what's difference?
76
+ model_path, device_map="auto"
77
+ ) # , load_in_8bit=True)
78
+ # model = AutoModelForCausalLM.from_pretrained(model_path, device_map="auto")#, load_in_8bit=True) # which is better?
79
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
80
+
81
+ # print('making a pipeline...')
82
+ # max_length has typically been deprecated for max_new_tokens
83
+ pipe = pipeline(
84
+ "text-generation",
85
+ model=model,
86
+ tokenizer=tokenizer,
87
+ max_new_tokens=1024, # need better set
88
+ model_kwargs={"temperature": 0.1}, # need better set
89
+ )
90
+ llm = HuggingFacePipeline(pipeline=pipe)
91
+
92
+ return llm
93
+
94
+
95
+
96
+ def get_llm_openai_chat(model_name, inference_server_url, langfuse_callback=None):
97
+ """Get openai-like LLM."""
98
+
99
+ # Some defaults
100
+ # chat_model_name = "openchat/openchat_3.5"
101
+ # inference_server_url = "http://localhost:8080/v1"
102
+ llm = ChatOpenAI(
103
+ model=model_name,
104
+ openai_api_key="EMPTY",
105
+ openai_api_base=inference_server_url,
106
+ max_tokens=1024, # better setting?
107
+ temperature=0, # default 0.7, better setting?
108
+ # callbacks=[langfuse_callback],
109
+ )
110
+
111
+ # The following is not required for builing normal llm
112
+ # use the Ragas LangchainLLM wrapper to create a RagasLLM instance
113
+ # vllm = LangchainLLM(llm=chat)
114
+ # return vllm
115
+ return llm
116
+
117
+
118
+ def get_chat_vllm(model_name, inference_server_url, langfuse_callback=None):
119
+
120
+ # to fix
121
+ # Create vLLM Langchain instance
122
+
123
+ # Some defaults
124
+ # chat_model_name = "openchat/openchat_3.5"
125
+ # inference_server_url = "http://localhost:8080/v1"
126
+ chat = ChatOpenAI(
127
+ model=model_name,
128
+ openai_api_key="EMPTY",
129
+ openai_api_base=inference_server_url,
130
+ max_tokens=512, # better setting?
131
+ temperature=0.1, # default 0.7, better setting?
132
+ # callbacks=[langfuse_callback],
133
+ )
134
+
135
+ # The following is not required for builing normal llm
136
+ # use the Ragas LangchainLLM wrapper to create a RagasLLM instance
137
+ # vllm = LangchainLLM(llm=chat)
138
+ # return vllm
139
+ return chat
models.py ADDED
@@ -0,0 +1,571 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # from langchain import HuggingFaceHub, LLMChain
2
+ from langchain.chains import LLMChain
3
+ from langchain.llms import HuggingFacePipeline
4
+ from transformers import (
5
+ AutoModelForCausalLM,
6
+ AutoTokenizer,
7
+ pipeline,
8
+ T5Tokenizer,
9
+ T5ForConditionalGeneration,
10
+ GPT2TokenizerFast,
11
+ )
12
+ from transformers import LlamaForCausalLM, AutoModelForCausalLM, LlamaTokenizer
13
+ from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
14
+ from langchain.prompts import SystemMessagePromptTemplate, HumanMessagePromptTemplate, ChatPromptTemplate, PromptTemplate
15
+
16
+ # model_path = "/mnt/localstorage/yinghan/llm/orca_mini_v3_13b"
17
+ # model = LlamaForCausalLM.from_pretrained(model_path, device_map="auto")#, load_in_8bit=True)
18
+ # tokenizer = AutoTokenizer.from_pretrained(model_path)
19
+ from langchain.chat_models import ChatOpenAI
20
+ # from langchain_openai import ChatOpenAI
21
+ from langchain.embeddings.openai import OpenAIEmbeddings
22
+ from langchain.embeddings import HuggingFaceEmbeddings
23
+ from langchain.vectorstores import Chroma
24
+ from langchain.text_splitter import (
25
+ CharacterTextSplitter,
26
+ RecursiveCharacterTextSplitter,
27
+ )
28
+ from langchain.document_loaders import TextLoader, UnstructuredHTMLLoader, PyPDFLoader
29
+ from langchain.chains.retrieval_qa.base import RetrievalQA
30
+ from langchain.llms import HuggingFaceHub
31
+ from dotenv import load_dotenv
32
+ from langchain.llms import HuggingFaceTextGenInference
33
+ from langchain.chains.question_answering import load_qa_chain
34
+ from langchain.chains import ConversationalRetrievalChain
35
+ from langchain.chains.conversation.memory import (
36
+ ConversationBufferMemory,
37
+ ConversationBufferWindowMemory,
38
+ )
39
+ # from ragas.llms import LangchainLLM
40
+
41
+
42
+ def get_llm_hf_online(inference_api_url=""):
43
+ if not inference_api_url: # default api url
44
+ inference_api_url = (
45
+ "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta"
46
+ )
47
+
48
+ llm = HuggingFaceTextGenInference(
49
+ # cache=None, # Optional: Cache verwenden oder nicht
50
+ verbose=True, # Provides detailed logs of operation
51
+ # callbacks=[StreamingStdOutCallbackHandler()], # Handeling Streams
52
+ max_new_tokens=1024, # Maximum number of token that can be generated.
53
+ # top_k=2, # Die Anzahl der Top-K Tokens, die beim Generieren berücksichtigt werden sollen
54
+ top_p=0.95, # Threshold for controlling randomness in text generation process.
55
+ typical_p=0.95, #
56
+ temperature=0.1, # For choosing probable words.
57
+ # repetition_penalty=None, # Wiederholungsstrafe beim Generieren
58
+ # truncate=None, # Schneidet die Eingabe-Tokens auf die gegebene Größe
59
+ # stop_sequences=None, # Eine Liste von Stop-Sequenzen beim Generieren
60
+ inference_server_url=inference_api_url, # URL des Inferenzservers
61
+ timeout=10, # Timeout for connection with the url
62
+ # streaming=True, # Streaming the answer
63
+ )
64
+
65
+ return llm
66
+
67
+
68
+ def get_llm_hf_local(model_path):
69
+ # model_path = "/mnt/localstorage/yinghan/llm/orca_mini_v3_13b"
70
+ # model_path = "/mnt/localstorage/yinghan/llm/zephyr-7b-beta"
71
+ model = LlamaForCausalLM.from_pretrained(
72
+ model_path, device_map="auto"
73
+ ) # , load_in_8bit=True)
74
+ # model = AutoModelForCausalLM.from_pretrained(model_path, device_map="auto")#, load_in_8bit=True) # which is better?
75
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
76
+
77
+ # print('making a pipeline...')
78
+ # max_length has typically been deprecated for max_new_tokens
79
+ pipe = pipeline(
80
+ "text-generation",
81
+ model=model,
82
+ tokenizer=tokenizer,
83
+ max_new_tokens=1024,
84
+ model_kwargs={"temperature": 0.1},
85
+ )
86
+ llm = HuggingFacePipeline(pipeline=pipe)
87
+
88
+ return llm
89
+
90
+
91
+ def get_llm_hf_local_zephyr(model_path):
92
+ # model_path = "/mnt/localstorage/yinghan/llm/orca_mini_v3_13b"
93
+ # model_path = "/mnt/localstorage/yinghan/llm/zephyr-7b-beta"
94
+ model = LlamaForCausalLM.from_pretrained(
95
+ model_path, device_map="auto"
96
+ ) # , load_in_8bit=True)
97
+ #import torch
98
+ #model = AutoModelForCausalLM.from_pretrained(model_path, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True)#, load_in_8bit=True) # which is better?
99
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
100
+
101
+ # print('making a pipeline...')
102
+ # max_length has typically been deprecated for max_new_tokens
103
+ pipe = pipeline(
104
+ "text-generation",
105
+ model=model,
106
+ tokenizer=tokenizer,
107
+ max_new_tokens=1024,
108
+ temperature=0.1,
109
+ # top_p=0.8,
110
+ # do_sample=True,
111
+ # repetition_penalty=1.1,
112
+ return_full_text=True
113
+ # model_kwargs={"temperature": 0.1},
114
+ )
115
+ llm = HuggingFacePipeline(pipeline=pipe)
116
+
117
+ return llm
118
+
119
+
120
+ def get_chat_vllm(model_name, inference_server_url, langfuse_callback=None):
121
+
122
+ # to fix
123
+ # Create vLLM Langchain instance
124
+
125
+ # Some defaults
126
+ # chat_model_name = "openchat/openchat_3.5"
127
+ # inference_server_url = "http://localhost:8080/v1"
128
+ chat = ChatOpenAI(
129
+ model=model_name,
130
+ openai_api_key="EMPTY",
131
+ openai_api_base=inference_server_url,
132
+ max_tokens=512, # better setting?
133
+ temperature=0.1, # default 0.7, better setting?
134
+ # callbacks=[langfuse_callback],
135
+ )
136
+
137
+ # The following is not required for builing normal llm
138
+ # use the Ragas LangchainLLM wrapper to create a RagasLLM instance
139
+ # vllm = LangchainLLM(llm=chat)
140
+ # return vllm
141
+ return chat
142
+
143
+ def get_chat_vllm_stream(model_name, inference_server_url, langfuse_callback=None):
144
+
145
+ # to fix
146
+ # Create vLLM Langchain instance
147
+
148
+ # Some defaults
149
+ # chat_model_name = "openchat/openchat_3.5"
150
+ # inference_server_url = "http://localhost:8080/v1"
151
+ chat = ChatOpenAI(
152
+ model=model_name,
153
+ openai_api_key="EMPTY",
154
+ openai_api_base=inference_server_url,
155
+ max_tokens=512, # better setting?
156
+ temperature=0.1, # default 0.7, better setting?
157
+ streaming=True,
158
+ callbacks=[StreamingStdOutCallbackHandler(), langfuse_callback],
159
+ )
160
+
161
+ # The following is not required for builing normal llm
162
+ # use the Ragas LangchainLLM wrapper to create a RagasLLM instance
163
+ # vllm = LangchainLLM(llm=chat)
164
+ # return vllm
165
+ return chat
166
+
167
+
168
+ def get_chat_vllm_stream_TODO(model_name, inference_server_url, streaming=True):
169
+
170
+ # to fix
171
+ # Create vLLM Langchain instance
172
+
173
+ if streaming:
174
+ streaming_callback = StreamingStdOutCallbackHandler()
175
+ else:
176
+ streaming_callback = None
177
+
178
+ from langchain.callbacks.manager import CallbackManager
179
+ callback_manager = CallbackManager([StreamingStdOutCallbackHandler()])
180
+ # Some defaults
181
+ # chat_model_name = "openchat/openchat_3.5"
182
+ # inference_server_url = "http://localhost:8080/v1"
183
+ chat = ChatOpenAI(
184
+ model=model_name,
185
+ openai_api_key="EMPTY",
186
+ openai_api_base=inference_server_url,
187
+ max_tokens=512, # better setting?
188
+ temperature=0.1, # default 0.7, better setting?
189
+ streaming=streaming,
190
+ callbacks=[streaming_callback],
191
+ callback_manager=callback_manager,
192
+ stream=True,
193
+ )
194
+
195
+ from langchain_community.llms import VLLMOpenAI
196
+ from langchain.callbacks.manager import CallbackManager
197
+ callback_manager = CallbackManager([StreamingStdOutCallbackHandler()])
198
+
199
+ llm = VLLMOpenAI(
200
+ openai_api_key="EMPTY",
201
+ openai_api_base=inference_server_url,
202
+ model=model_name,
203
+ max_tokens=512, # better setting?
204
+ temperature=0.1, # default 0.7, better setting?
205
+ streaming=True,
206
+ stream=True, # necessary?
207
+ callbacks=[streaming_callback],
208
+ callback_manager=callback_manager,
209
+ )
210
+
211
+ # The following is not required for builing normal llm
212
+ # use the Ragas LangchainLLM wrapper to create a RagasLLM instance
213
+ # vllm = LangchainLLM(llm=chat)
214
+ # return vllm
215
+ return chat
216
+
217
+
218
+
219
+ def _get_llm_hf_local(model_path):
220
+ model_path = "/mnt/localstorage/yinghan/llm/orca_mini_v3_13b"
221
+ model_path = "/mnt/localstorage/yinghan/llm/zephyr-7b-beta"
222
+ model = LlamaForCausalLM.from_pretrained(
223
+ model_path, device_map="auto"
224
+ ) # , load_in_8bit=True)
225
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
226
+
227
+ # print('making a pipeline...')
228
+ # max_length has typically been deprecated for max_new_tokens
229
+ pipe = pipeline(
230
+ "text-generation",
231
+ model=model,
232
+ tokenizer=tokenizer,
233
+ max_new_tokens=1024,
234
+ model_kwargs={"temperature": 0},
235
+ )
236
+ llm = HuggingFacePipeline(pipeline=pipe)
237
+
238
+ return llm
239
+
240
+
241
+
242
+ from langchain.chains import RetrievalQAWithSourcesChain, StuffDocumentsChain
243
+
244
+ def get_cite_combine_docs_chain(llm):
245
+
246
+ # Ref: https://github.com/langchain-ai/langchain/issues/7239
247
+ # Function to format each document with an index, source, and content.
248
+ def format_document(doc, index, prompt):
249
+ """Format a document into a string based on a prompt template."""
250
+ # Create a dictionary with document content and metadata.
251
+ base_info = {"page_content": doc.page_content, "index": index, "source": doc.metadata["source"]}
252
+
253
+ # Check if any metadata is missing.
254
+ missing_metadata = set(prompt.input_variables).difference(base_info)
255
+ if len(missing_metadata) > 0:
256
+ raise ValueError(f"Missing metadata: {list(missing_metadata)}.")
257
+
258
+ # Filter only necessary variables for the prompt.
259
+ document_info = {k: base_info[k] for k in prompt.input_variables}
260
+ return prompt.format(**document_info)
261
+
262
+ # Custom chain class to handle document combination with source indices.
263
+ class StuffDocumentsWithIndexChain(StuffDocumentsChain):
264
+ def _get_inputs(self, docs, **kwargs):
265
+ # Format each document and combine them.
266
+ doc_strings = [
267
+ format_document(doc, i, self.document_prompt)
268
+ for i, doc in enumerate(docs, 1)
269
+ ]
270
+
271
+ # Filter only relevant input variables for the LLM chain prompt.
272
+ inputs = {k: v for k, v in kwargs.items() if k in self.llm_chain.prompt.input_variables}
273
+ inputs[self.document_variable_name] = self.document_separator.join(doc_strings)
274
+ return inputs
275
+
276
+ # Ref: https://huggingface.co/spaces/Ekimetrics/climate-question-answering/blob/main/climateqa/engine/prompts.py
277
+ # Define a chat prompt with instructions for citing documents.
278
+ combine_doc_prompt = PromptTemplate(
279
+ input_variables=["context", "question"],
280
+ template="""You are given a question and passages. Provide a clear and structured Helpful Answer based on the passages provided,
281
+ the context and the guidelines.
282
+
283
+ Guidelines:
284
+ - If the passages have useful facts or numbers, use them in your answer.
285
+ - When you use information from a passage, mention where it came from by using format [[i]] at the end of the sentence. i stands for the paper index of the document.
286
+ - Do not cite the passage in a style like 'passage i', always use format [[i]] where i stands for the passage index of the document.
287
+ - Do not use the sentence such as 'Doc i says ...' or '... in Doc i' or 'Passage i ...' to say where information came from.
288
+ - If the same thing is said in more than one document, you can mention all of them like this: [[i]], [[j]], [[k]].
289
+ - Do not just summarize each passage one by one. Group your summaries to highlight the key parts in the explanation.
290
+ - If it makes sense, use bullet points and lists to make your answers easier to understand.
291
+ - You do not need to use every passage. Only use the ones that help answer the question.
292
+ - If the documents do not have the information needed to answer the question, just say you do not have enough information.
293
+ - If the passage is the caption of a picture, you can still use it as part of your answer as any other document.
294
+
295
+ -----------------------
296
+ Passages:
297
+ {context}
298
+ -----------------------
299
+ Question: {question}
300
+
301
+ Helpful Answer with format citations:"""
302
+ )
303
+
304
+ # Initialize the custom chain with a specific document format.
305
+ combine_docs_chain = StuffDocumentsWithIndexChain(
306
+ llm_chain=LLMChain(
307
+ llm=llm,
308
+ prompt=combine_doc_prompt,
309
+ ),
310
+ document_prompt=PromptTemplate(
311
+ input_variables=["index", "source", "page_content"],
312
+ template="[[{index}]]\nsource: {source}:\n{page_content}",
313
+ ),
314
+ document_variable_name="context",
315
+ )
316
+
317
+ return combine_docs_chain
318
+
319
+
320
+ class ConversationChainFactory_bp:
321
+ def __init__(
322
+ self, memory_key="chat_history", output_key="answer", return_messages=True
323
+ ):
324
+ self.memory_key = memory_key
325
+ self.output_key = output_key
326
+ self.return_messages = return_messages
327
+
328
+ def create(self, vectorstore, llm):
329
+ memory = ConversationBufferWindowMemory( # ConversationBufferMemory(
330
+ memory_key=self.memory_key,
331
+ return_messages=self.return_messages,
332
+ output_key=self.output_key,
333
+ )
334
+
335
+ # https://github.com/langchain-ai/langchain/issues/4608
336
+ conversation_chain = ConversationalRetrievalChain.from_llm(
337
+ llm=llm,
338
+ retriever=vectorstore.as_retriever(), # search_kwargs={"k": 8}),
339
+ memory=memory,
340
+ return_source_documents=True,
341
+ )
342
+
343
+ return conversation_chain
344
+
345
+
346
+ class ConversationChainFactory:
347
+ def __init__(
348
+ self, memory_key="chat_history", output_key="answer", return_messages=True
349
+ ):
350
+ self.memory_key = memory_key
351
+ self.output_key = output_key
352
+ self.return_messages = return_messages
353
+
354
+ def create(self, retriver, llm, langfuse_callback=None):
355
+ memory = ConversationBufferWindowMemory( # ConversationBufferMemory(
356
+ memory_key=self.memory_key,
357
+ return_messages=self.return_messages,
358
+ output_key=self.output_key,
359
+ )
360
+
361
+ # prompt:
362
+ # https://github.com/langchain-ai/langchain/issues/6530
363
+
364
+
365
+ prompt_template = """You are a helpful research assistant. Use the following pieces of context to answer the question at the end.
366
+ Please ignore the contexts if they are not related to the question. If you don't know the answer, just say that you don't know,
367
+ don't try to make up an answer.
368
+
369
+ {context}
370
+
371
+ Question: {question}
372
+
373
+ Helpful Answer:"""
374
+ PROMPT = PromptTemplate(
375
+ template=prompt_template, input_variables=["context", "question"]
376
+ )
377
+
378
+ # Rephrase question based on history
379
+ # https://www.paepper.com/blog/posts/how-to-build-a-chatbot-out-of-your-website-content/
380
+ # tested: Be careful with the technical abbreviations and items, do not modify them unless necessary -> worse
381
+ # You are a helpful research assistant. -> worse, tend to expand question
382
+ # My testing prompt
383
+ # _template = """Given the following conversation and a follow up question,
384
+ # rephrase the follow up question to be a standalone question only when it is necessary.
385
+ # If the conversation is not related to the question, do not rephrase the follow up question
386
+ # and just put the standalone question exactly the same as the original follow up question.
387
+ # The standalone question should be in its original language, which is usually english.
388
+
389
+ # Chat History: {chat_history}
390
+
391
+ # Follow Up Question: {question}
392
+
393
+ # Standalone Question:"""
394
+
395
+ # Type 2: https://github.com/langchain-ai/langchain/issues/4076
396
+ _template = """Return text in the original language of the follow up question.
397
+ If the follow up question does not need context, return the exact same text back.
398
+ Never rephrase the follow up question given the chat history unless the follow up question needs context.
399
+
400
+ Chat History: {chat_history}
401
+
402
+ Follow Up Question: {question}
403
+
404
+ Standalone Question:"""
405
+ CONDENSE_QUESTION_PROMPT = PromptTemplate.from_template(_template)
406
+ # or just turn if off, see https://github.com/langchain-ai/langchain/issues/4076
407
+
408
+ # Change prompt to context-based QA
409
+ # system_template = """You are a professional scientist. Use the following pieces of context to answer the users question.
410
+ # Please ignore the contexts if they are not related to the question. If you don't know the answer, just say that you don't know, don't try to make up an answer.
411
+ # ----------------
412
+ # {context}"""
413
+ # messages = [
414
+ # SystemMessagePromptTemplate.from_template(system_template),
415
+ # HumanMessagePromptTemplate.from_template("{question}"),
416
+ # ]
417
+ # QA_CHAT_PROMPT = ChatPromptTemplate.from_messages(messages)
418
+
419
+ # https://github.com/langchain-ai/langchain/issues/4608
420
+ conversation_chain = ConversationalRetrievalChain.from_llm(
421
+ llm=llm,
422
+ retriever=retriver,
423
+ memory=memory,
424
+ return_source_documents=True,
425
+ # return_generated_question=True, # for debug
426
+ rephrase_question=False, # Disable rephrase, for test purpose
427
+ get_chat_history=lambda x: x,
428
+ # callbacks=[langfuse_callback]
429
+ # verbose=True,
430
+ # combine_docs_chain_kwargs={"prompt": PROMPT},
431
+ # condense_question_prompt=CONDENSE_QUESTION_PROMPT,
432
+ )
433
+
434
+
435
+
436
+ return conversation_chain
437
+
438
+
439
+ class ConversationChainFactoryDev:
440
+ def __init__(
441
+ self, memory_key="chat_history", output_key="answer", return_messages=True
442
+ ):
443
+ self.memory_key = memory_key
444
+ self.output_key = output_key
445
+ self.return_messages = return_messages
446
+
447
+ def create(self, retriver, llm, langfuse_callback=None):
448
+ memory = ConversationBufferWindowMemory( # ConversationBufferMemory(
449
+ memory_key=self.memory_key,
450
+ return_messages=self.return_messages,
451
+ output_key=self.output_key,
452
+ )
453
+
454
+ # prompt:
455
+ # https://github.com/langchain-ai/langchain/issues/6530
456
+
457
+
458
+ prompt_template = """You are a helpful research assistant. Use the following pieces of context to answer the question at the end.
459
+ Please ignore the contexts if they are not related to the question. If you don't know the answer, just say that you don't know,
460
+ don't try to make up an answer.
461
+
462
+ {context}
463
+
464
+ Question: {question}
465
+
466
+ Helpful Answer:"""
467
+ PROMPT = PromptTemplate(
468
+ template=prompt_template, input_variables=["context", "question"]
469
+ )
470
+
471
+ # Rephrase question based on history
472
+ # https://www.paepper.com/blog/posts/how-to-build-a-chatbot-out-of-your-website-content/
473
+ # tested: Be careful with the technical abbreviations and items, do not modify them unless necessary -> worse
474
+ # You are a helpful research assistant. -> worse, tend to expand question
475
+ # My testing prompt
476
+ # _template = """Given the following conversation and a follow up question,
477
+ # rephrase the follow up question to be a standalone question only when it is necessary.
478
+ # If the conversation is not related to the question, do not rephrase the follow up question
479
+ # and just put the standalone question exactly the same as the original follow up question.
480
+ # The standalone question should be in its original language, which is usually english.
481
+
482
+ # Chat History: {chat_history}
483
+
484
+ # Follow Up Question: {question}
485
+
486
+ # Standalone Question:"""
487
+
488
+ # Type 2: https://github.com/langchain-ai/langchain/issues/4076
489
+ _template = """Return text in the original language of the follow up question.
490
+ If the follow up question does not need context, return the exact same text back.
491
+ Never rephrase the follow up question given the chat history unless the follow up question needs context.
492
+
493
+ Chat History: {chat_history}
494
+
495
+ Follow Up Question: {question}
496
+
497
+ Standalone Question:"""
498
+ CONDENSE_QUESTION_PROMPT = PromptTemplate.from_template(_template)
499
+ # or just turn if off, see https://github.com/langchain-ai/langchain/issues/4076
500
+
501
+ # Change prompt to context-based QA
502
+ # system_template = """You are a professional scientist. Use the following pieces of context to answer the users question.
503
+ # Please ignore the contexts if they are not related to the question. If you don't know the answer, just say that you don't know, don't try to make up an answer.
504
+ # ----------------
505
+ # {context}"""
506
+ # messages = [
507
+ # SystemMessagePromptTemplate.from_template(system_template),
508
+ # HumanMessagePromptTemplate.from_template("{question}"),
509
+ # ]
510
+ # QA_CHAT_PROMPT = ChatPromptTemplate.from_messages(messages)
511
+
512
+ # https://github.com/langchain-ai/langchain/issues/4608
513
+
514
+
515
+
516
+ conversation_chain = ConversationalRetrievalChain.from_llm(
517
+ llm=llm,
518
+ retriever=retriver,
519
+ memory=memory,
520
+ return_source_documents=True,
521
+ # return_generated_question=True, # for debug
522
+ rephrase_question=False, # Disable rephrase, for test purpose
523
+ get_chat_history=lambda x: x,
524
+ # callbacks=[langfuse_callback]
525
+ # verbose=True,
526
+ # combine_docs_chain_kwargs={"prompt": PROMPT},
527
+ # condense_question_prompt=CONDENSE_QUESTION_PROMPT,
528
+ )
529
+
530
+
531
+ return conversation_chain
532
+
533
+
534
+ class RAGChain:
535
+ def __init__(
536
+ self, memory_key="chat_history", output_key="answer", return_messages=True
537
+ ):
538
+ self.memory_key = memory_key
539
+ self.output_key = output_key
540
+ self.return_messages = return_messages
541
+
542
+ def create(self, retriever, llm, add_citation=False):
543
+ memory = ConversationBufferWindowMemory( # ConversationBufferMemory(
544
+ k=2,
545
+ memory_key=self.memory_key,
546
+ return_messages=self.return_messages,
547
+ output_key=self.output_key,
548
+ )
549
+
550
+ # https://github.com/langchain-ai/langchain/issues/4608
551
+ conversation_chain = ConversationalRetrievalChain.from_llm(
552
+ llm=llm,
553
+ retriever=retriever,
554
+ memory=memory,
555
+ return_source_documents=True,
556
+ rephrase_question=False, # disable rephrase, for test purpose
557
+ get_chat_history=lambda x: x,
558
+ # return_generated_question=True, # for debug
559
+ # verbose=True,
560
+ # combine_docs_chain_kwargs={"prompt": PROMPT}, # additional prompt control
561
+ # condense_question_prompt=CONDENSE_QUESTION_PROMPT, # additional prompt control
562
+ )
563
+
564
+ # Add citation, ATTENTION: experimental
565
+ if add_citation:
566
+ # from models import get_cite_combine_docs_chain
567
+ cite_combine_docs_chain = get_cite_combine_docs_chain(llm)
568
+ conversation_chain.combine_docs_chain = cite_combine_docs_chain
569
+
570
+ return conversation_chain
571
+
paper_list.md ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1. Ahmed, Shamail, Matteo Bianchini, Anuj Pokle, Manveer Singh Munde, Pascal Hartmann, Torsten Brezesinski, Andreas Beyer, Jürgen Janek, and Kerstin Volz. “Visualization of Light Elements Using 4D STEM: The Layered‐to‐Rock Salt Phase Transition in LiNiO 2 Cathode Material.” Advanced Energy Materials 10, no. 25 (July 2020): 2001026. https://doi.org/10.1002/aenm.202001026.
2
+ 1. Ahmed, Shamail, Anuj Pokle, Matteo Bianchini, Simon Schweidler, Andreas Beyer, Torsten Brezesinski, Jürgen Janek, and Kerstin Volz. “Understanding the Formation of Antiphase Boundaries in Layered Oxide Cathode Materials and Their Evolution upon Electrochemical Cycling.” Matter 4, no. 12 (December 2021): 3953–66. https://doi.org/10.1016/j.matt.2021.10.001.
3
+ 1. Aktekin, Burak, Luise M. Riegger, Svenja-K. Otto, Till Fuchs, Anja Henss, and Jürgen Janek. “SEI Growth on Lithium Metal Anodes in Solid-State Batteries Quantified with Coulometric Titration Time Analysis.” Nature Communications 14, no. 1 (October 31, 2023): 6946. https://doi.org/10.1038/s41467-023-42512-y.
4
+ 1. Ali, Md Yusuf, Hans Orthner, and Hartmut Wiggers. “Spray Flame Synthesis (SFS) of Lithium Lanthanum Zirconate (LLZO) Solid Electrolyte.” Materials 14, no. 13 (June 22, 2021): 3472. https://doi.org/10.3390/ma14133472.
5
+ 1. Batzer, Mattis, Carina Heck, Peter Michalowski, and Arno Kwade. “Current Status of Formulations and Scalable Processes for Producing Sulfidic Solid‐State Batteries.” Batteries & Supercaps 5, no. 12 (December 2022): e202200328. https://doi.org/10.1002/batt.202200328.
6
+ 1. Bauer, Alexander, Christoph Roitzheim, Sandra Lobe, Yoo Jung Sohn, Doris Sebold, Walter Sebastian Scheld, Martin Finsterbusch, Olivier Guillon, Dina Fattakhova-Rohlfing, and Sven Uhlenbruck. “Impact of Ni–Mn–Co–Al-Based Cathode Material Composition on the Sintering with Garnet Solid Electrolytes for All-Solid-State Batteries.” Chemistry of Materials 35, no. 21 (November 14, 2023): 8958–68. https://doi.org/10.1021/acs.chemmater.3c01573.
7
+ 1. Beaupain, Jean Philippe, Katja Waetzig, Svenja-Katharina Otto, Anja Henss, Jürgen Janek, Michael Malaki, Anuj Pokle, et al. “Reaction of Li 1.3 Al 0.3 Ti 1.7 (PO 4 ) 3 and LiNi 0.6 Co 0.2 Mn 0.2 O 2 in Co-Sintered Composite Cathodes for Solid-State Batteries.” ACS Applied Materials & Interfaces 13, no. 40 (October 13, 2021): 47488–98. https://doi.org/10.1021/acsami.1c11750.
8
+ 1. Becker-Steinberger, Katharina, Simon Schardt, Birger Horstmann, and Arnulf Latz. “Statics and Dynamics of Space-Charge-Layers in Polarized Inorganic Solid Electrolytes.” arXiv, January 25, 2021. http://arxiv.org/abs/2101.10294.
9
+ 1. Bielefeld, Anja, Dominik A. Weber, Raffael Rueß, Vedran Glavas, and Jürgen Janek. “Influence of Lithium Ion Kinetics, Particle Morphology and Voids on the Electrochemical Performance of Composite Cathodes for All-Solid-State Batteries.” Journal of The Electrochemical Society 169, no. 2 (February 1, 2022): 020539. https://doi.org/10.1149/1945-7111/ac50df.
10
+ 1. Borzutzki, Kristina, Dengpan Dong, Christian Wölke, Margarita Kruteva, Annika Stellhorn, Martin Winter, Dmitry Bedrov, and Gunther Brunklaus. “Small Groups, Big Impact: Eliminating Li+ Traps in Single-Ion Conducting Polymer Electrolytes.” iScience 23, no. 8 (August 2020): 101417. https://doi.org/10.1016/j.isci.2020.101417.
11
+ 1. Borzutzki, Kristina, Kang Dong, Jijeesh Ravi Nair, Beatrice Wolff, Florian Hausen, Rüdiger-A. Eichel, Martin Winter, Ingo Manke, and Gunther Brunklaus. “Lithium Deposition in Single-Ion Conducting Polymer Electrolytes.” Cell Reports Physical Science 2, no. 7 (July 2021): 100496. https://doi.org/10.1016/j.xcrp.2021.100496.
12
+ 1. Borzutzki, Kristina, Jijeesh Ravi Nair, Martin Winter, and Gunther Brunklaus. “Does Cell Polarization Matter in Single-Ion Conducting Electrolytes?” ACS Applied Materials & Interfaces 14, no. 4 (February 2, 2022): 5211–22. https://doi.org/10.1021/acsami.1c19097.
13
+ 1. Borzutzki, Kristina, Martin Winter, and Gunther Brunklaus. “Improving the NMC111∣Polymer Electrolyte Interface by Cathode Composition and Processing.” Journal of The Electrochemical Society 167, no. 7 (January 5, 2020): 070546. https://doi.org/10.1149/1945-7111/ab7fb5.
14
+ 1. Brandt, Nico, Nikolay T. Garabedian, Ephraim Schoof, Paul J. Schreiber, Philipp Zschumme, Christian Greiner, and Michael Selzer. “Managing FAIR Tribological Data Using Kadi4Mat.” Data 7, no. 2 (January 25, 2022): 15. https://doi.org/10.3390/data7020015.
15
+ 1. Brandt, Nico, Lars Griem, Christoph Herrmann, Ephraim Schoof, Giovanna Tosato, Yinghan Zhao, Philipp Zschumme, and Michael Selzer. “Kadi4Mat: A Research Data Infrastructure for Materials Science.” Data Science Journal 20 (February 10, 2021): 8. https://doi.org/10.5334/dsj-2021-008.
16
+ 1. Bresser, Dominic, Sandrine Lyonnard, Cristina Iojoiu, Lionel Picard, and Stefano Passerini. “Decoupling Segmental Relaxation and Ionic Conductivity for Lithium-Ion Polymer Electrolytes.” Molecular Systems Design & Engineering 4, no. 4 (2019): 779–92. https://doi.org/10.1039/C9ME00038K.
17
+ 1. Burmeister, Christine Friederike, Moritz Hofer, Palanivel Molaiyan, Peter Michalowski, and Arno Kwade. “Characterization of Stressing Conditions in a High Energy Ball Mill by Discrete Element Simulations.” Processes 10, no. 4 (April 1, 2022): 692. https://doi.org/10.3390/pr10040692.
18
+ 1. Butzelaar, Andreas J., Sven Schneider, Edgar Molle, and Patrick Theato. “Synthesis and Post‐Polymerization Modification of Defined Functional Poly(Vinyl Ether)s.” Macromolecular Rapid Communications 42, no. 13 (July 2021): 2100133. https://doi.org/10.1002/marc.202100133.
19
+ 1. Butzelaar, Andreas Johannes. “Poly(ethylene oxide)-based Architectures as Polymer Electrolytes for Solid-State Lithium-Metal Batteries,” 2022.
20
+ 1. Butzelaar, Andreas Johannes, Martin Gauthier-Jaques, Kun Ling Liu, Gunther Brunklaus, Martin Winter, and Patrick Theato. “The Power of Architecture – Cage-Shaped PEO and Its Application as a Polymer Electrolyte.” Polymer Chemistry, 2021.
21
+ 1. Chen, Yi‐Hsuan, Yi‐Chen Hsieh, Kun Ling Liu, Lennart Wichmann, Johannes Helmut Thienenkamp, Aditya Choudhary, Dmitry Bedrov, Martin Winter, and Gunther Brunklaus. “Green Polymer Electrolytes Based on Polycaprolactones for Solid‐State High‐Voltage Lithium Metal Batteries.” Macromolecular Rapid Communications 43, no. 20 (October 2022): 2200335. https://doi.org/10.1002/marc.202200335.
22
+ 1. Chen, Yi‐Hsuan, Peter Lennartz, Kun Ling Liu, Yi‐Chen Hsieh, Felix Scharf, Rayan Guerdelli, Annika Buchheit, et al. “Towards All‐Solid‐State Polymer Batteries: Going Beyond PEO with Hybrid Concepts.” Advanced Functional Materials 33, no. 32 (August 2023): 2300501. https://doi.org/10.1002/adfm.202300501.
23
+ 1. Chen, Zhen, Huu‐Dat Nguyen, Maider Zarrabeitia, Hai‐Peng Liang, Dorin Geiger, Jae‐Kwang Kim, Ute Kaiser, Stefano Passerini, Cristina Iojoiu, and Dominic Bresser. “Lithium Phosphonate Functionalized Polymer Coating for High‐Energy Li[Ni 0.8 Co 0.1 Mn 0.1 ]O 2 with Superior Performance at Ambient and Elevated Temperatures.” Advanced Functional Materials 31, no. 41 (October 2021): 2105343. https://doi.org/10.1002/adfm.202105343.
24
+ 1. Chiou, Min-Huei, Elisabeth Verweyen, Diddo Diddens, Lennart Wichmann, Christina Schmidt, Kerstin Neuhaus, Aditya Choudhary, Dmitry Bedrov, Martin Winter, and Gunther Brunklaus. “Selection of Polymer Segment Species Matters for Electrolyte Properties and Performance in Lithium Metal Batteries.” ACS Applied Energy Materials 6, no. 8 (April 24, 2023): 4422–36. https://doi.org/10.1021/acsaem.3c00571.
25
+ 1. Conforto, Gioele, Raffael Ruess, Daniel Schröder, Enrico Trevisanello, Roberto Fantin, Felix H. Richter, and Jürgen Janek. “Editors’ Choice—Quantification of the Impact of Chemo-Mechanical Degradation on the Performance and Cycling Stability of NCM-Based Cathodes in Solid-State Li-Ion Batteries.” Journal of The Electrochemical Society 168, no. 7 (July 1, 2021): 070546. https://doi.org/10.1149/1945-7111/ac13d2.
26
+ 1. Demuth, Thomas, Till Fuchs, Andreas Beyer, Jürgen Janek, and Kerstin Volz. “‘Depo-All-around’: A Novel FIB-Based TEM Specimen Preparation Technique for Solid State Battery Composites and Other Loosely Bound Samples.” Ultramicroscopy 257 (March 2024): 113904. https://doi.org/10.1016/j.ultramic.2023.113904.
27
+ 1. Dong, Xu, Xu Liu, Jin Han, Zhen Chen, Huang Zhang, Stefano Passerini, and Dominic Bresser. “Synthesis and Application of an Aromatic Sulfonate Sodium Salt for Aqueous Sodium‐Ion Battery Electrolytes.” Energy Technology 11, no. 1 (January 2023): 2201045. https://doi.org/10.1002/ente.202201045.
28
+ 1. Eckhardt, Janis K., Simon Burkhardt, Julian Zahnow, Matthias T. Elm, Jürgen Janek, Peter J. Klar, and Christian Heiliger. “Understanding the Impact of Microstructure on Charge Transport in Polycrystalline Materials Through Impedance Modelling.” Journal of The Electrochemical Society 168, no. 9 (September 1, 2021): 090516. https://doi.org/10.1149/1945-7111/ac1cfe.
29
+ 1. Eckhardt, Janis K., Till Fuchs, Simon Burkhardt, Peter J. Klar, Jürgen Janek, and Christian Heiliger. “Guidelines for Impedance Analysis of Parent Metal Anodes in Solid‐State Batteries and the Role of Current Constriction at Interface Voids, Heterogeneities, and SEI.” Advanced Materials Interfaces 10, no. 8 (March 2023): 2202354. https://doi.org/10.1002/admi.202202354.
30
+ 1. Erhard, Linus C., Jochen Rohrer, Karsten Albe, and Volker L. Deringer. “A Machine-Learned Interatomic Potential for Silica and Its Relation to Empirical Models.” Npj Computational Materials 8, no. 1 (April 28, 2022): 90. https://doi.org/10.1038/s41524-022-00768-w.
31
+ 1. Erhard, Linus C., Jochen Rohrer, Karsten Albe, and Volker L. Deringer. “Modelling Atomic and Nanoscale Structure in the Silicon-Oxygen System through Active Machine Learning.” arXiv, September 7, 2023. http://arxiv.org/abs/2309.03587.
32
+ 1. Falco, M., S. Palumbo, G. Lingua, L. Silvestri, M. Winter, R. Lin, V. Pellegrini, F. Bonaccorso, Jijeesh R. Nair, and C. Gerbaldi. “A Bilayer Polymer Electrolyte Encompassing Pyrrolidinium-Based RTIL for Binder-Free Silicon Few-Layer Graphene Nanocomposite Anodes for Li-Ion Battery.” Electrochemistry Communications 118 (September 2020): 106807. https://doi.org/10.1016/j.elecom.2020.106807.
33
+ 1. Fritsch, Charlotte, Anna-Lena Hansen, Sylvio Indris, Michael Knapp, and Helmut Ehrenberg. “Mechanochemical Synthesis of Amorphous and Crystalline Na 2 P 2 S 6 – Elucidation of Local Structural Changes by X-Ray Total Scattering and NMR.” Dalton Transactions 49, no. 5 (2020): 1668–73. https://doi.org/10.1039/C9DT04777H.
34
+ 1. Fritsch, Charlotte, Tatiana Zinkevich, Sylvio Indris, Martin Etter, Volodymyr Baran, Thomas Bergfeldt, Michael Knapp, Helmut Ehrenberg, and Anna-Lena Hansen. “Garnet to Hydrogarnet: Effect of Post Synthesis Treatment on Cation Substituted LLZO Solid Electrolyte and Its Effect on Li Ion Conductivity.” RSC Advances 11, no. 48 (2021): 30283–94. https://doi.org/10.1039/D1RA05961K.
35
+ 1. Fuchs, Till, Boris Mogwitz, Svenja‐Katharina Otto, Stefano Passerini, Felix H. Richter, and Jürgen Janek. “Working Principle of an Ionic Liquid Interlayer During Pressureless Lithium Stripping on Li 6.25 Al 0.25 La 3 Zr 2 O 12 (LLZO) Garnet‐Type Solid Electrolyte.” Batteries & Supercaps 4, no. 7 (July 2021): 1145–55. https://doi.org/10.1002/batt.202100015.
36
+ 1. Garabedian, Nikolay T., Paul J. Schreiber, Nico Brandt, Philipp Zschumme, Ines L. Blatter, Antje Dollmann, Christian Haug, et al. “Generating FAIR Research Data in Experimental Tribology.” Scientific Data 9, no. 1 (June 16, 2022): 315. https://doi.org/10.1038/s41597-022-01429-9.
37
+ 1. Gautam, Ajay, Marcel Sadowski, Michael Ghidiu, Nicolò Minafra, Anatoliy Senyshyn, Karsten Albe, and Wolfgang G. Zeier. “Engineering the Site‐Disorder and Lithium Distribution in the Lithium Superionic Argyrodite Li 6 PS 5 Br.” Advanced Energy Materials 11, no. 5 (February 2021): 2003369. https://doi.org/10.1002/aenm.202003369.
38
+ 1. Ghidiu, Michael, Roman Schlem, and Wolfgang G. Zeier. “Pyridine Complexes as Tailored Precursors for Rapid Synthesis of Thiophosphate Superionic Conductors.” Batteries & Supercaps 4, no. 4 (April 2021): 607–11. https://doi.org/10.1002/batt.202000317.
39
+ 1. Griem, Lars, Philipp Zschumme, Matthieu Laqua, Nico Brandt, Ephraim Schoof, Patrick Altschuh, and Michael Selzer. “KadiStudio: FAIR Modelling of Scientific Research Processes.” Data Science Journal 21 (September 23, 2022): 16. https://doi.org/10.5334/dsj-2022-016.
40
+ 1. Haffner, Arthur, Anna‐Katharina Hatz, Constantin Hoch, Bettina V. Lotsch, and Dirk Johrendt. “Synthesis and Structure of the Sodium Phosphidosilicate Na 2 SiP 2.” European Journal of Inorganic Chemistry 2020, no. 7 (February 21, 2020): 617–21. https://doi.org/10.1002/ejic.201901083.
41
+ 1. Haffner, Arthur, Anna‐Katharina Hatz, Otto E. O. Zeman, Constantin Hoch, Bettina V. Lotsch, and Dirk Johrendt. “Polymorphism and Fast Potassium‐Ion Conduction in the T5 Supertetrahedral Phosphidosilicate KSi 2 P 3.” Angewandte Chemie International Edition 60, no. 24 (June 7, 2021): 13641–46. https://doi.org/10.1002/anie.202101187.
42
+ 1. Harm, Sascha, Anna-Katharina Hatz, Igor Moudrakovski, Roland Eger, Alexander Kuhn, Constantin Hoch, and Bettina V. Lotsch. “Lesson Learned from NMR: Characterization and Ionic Conductivity of LGPS-like Li 7 SiPS 8.” Chemistry of Materials 31, no. 4 (February 26, 2019): 1280–88. https://doi.org/10.1021/acs.chemmater.8b04051.
43
+ 1. Harm, Sascha, Anna-Katharina Hatz, Christian Schneider, Carla Hoefer, Constantin Hoch, and Bettina V. Lotsch. “Finding the Right Blend: Interplay Between Structure and Sodium Ion Conductivity in the System Na5AlS4–Na4SiS4.” Frontiers in Chemistry 8 (February 18, 2020): 90. https://doi.org/10.3389/fchem.2020.00090.
44
+ 1. Hatz, Anna-Katharina, Igor Moudrakovski, Sebastian Bette, Maxwell W. Terban, Martin Etter, Markus Joos, Nella M. Vargas-Barbosa, Robert E. Dinnebier, and Bettina V. Lotsch. “Fast Water-Assisted Lithium Ion Conduction in Restacked Lithium Tin Sulfide Nanosheets.” Chemistry of Materials 33, no. 18 (September 28, 2021): 7337–49. https://doi.org/10.1021/acs.chemmater.1c01755.
45
+ 1. Helm, Bianca, Nicolò Minafra, Björn Wankmiller, Matthias T. Agne, Cheng Li, Anatoliy Senyshyn, Michael Ryan Hansen, and Wolfgang G. Zeier. “Correlating Structural Disorder to Li + Ion Transport in Li 4– x Ge 1– x Sb x S 4 (0 ≤ x ≤ 0.2).” Chemistry of Materials 34, no. 12 (June 28, 2022): 5558–70. https://doi.org/10.1021/acs.chemmater.2c00608.
46
+ 1. Hertle, Jonas, Felix Walther, Boris Mogwitz, Steffen Schröder, Xiaohan Wu, Felix H. Richter, and Jürgen Janek. “Miniaturization of Reference Electrodes for Solid-State Lithium-Ion Batteries.” Journal of The Electrochemical Society 170, no. 4 (April 1, 2023): 040519. https://doi.org/10.1149/1945-7111/accb6f.
47
+ 1. Heubner, Christian, Sebastian Maletti, Henry Auer, Juliane Hüttl, Karsten Voigt, Oliver Lohrberg, Kristian Nikolowski, Mareike Partsch, and Alexander Michaelis. “From Lithium‐Metal toward Anode‐Free Solid‐State Batteries: Current Developments, Issues, and Challenges.” Advanced Functional Materials 31, no. 51 (December 2021): 2106608. https://doi.org/10.1002/adfm.202106608.
48
+ 1. Hofer, Moritz, Michael Grube, Christine Friederike Burmeister, Peter Michalowski, Sabrina Zellmer, and Arno Kwade. “Effective Mechanochemical Synthesis of Sulfide Solid Electrolyte Li3PS4 in a High Energy Ball Mill by Process Investigation.” Advanced Powder Technology 34, no. 6 (June 2023): 104004. https://doi.org/10.1016/j.apt.2023.104004.
49
+ 1. Homann, Gerrit, Lukas Stolz, Jijeesh Nair, Isidora Cekic Laskovic, Martin Winter, and Johannes Kasnatscheew. “Poly(Ethylene Oxide)-Based Electrolyte for Solid-State-Lithium-Batteries with High Voltage Positive Electrodes: Evaluating the Role of Electrolyte Oxidation in Rapid Cell Failure.” Scientific Reports 10, no. 1 (March 9, 2020): 4390. https://doi.org/10.1038/s41598-020-61373-9.
50
+ 1. Homann, Gerrit, Lukas Stolz, Kerstin Neuhaus, Martin Winter, and Johannes Kasnatscheew. “Effective Optimization of High Voltage Solid‐State Lithium Batteries by Using Poly(Ethylene Oxide)‐Based Polymer Electrolyte with Semi‐Interpenetrating Network.” Advanced Functional Materials 30, no. 46 (November 2020): 2006289. https://doi.org/10.1002/adfm.202006289.
51
+ 1. Homann, Gerrit, Lukas Stolz, Martin Winter, and Johannes Kasnatscheew. “Elimination of ‘Voltage Noise’ of Poly (Ethylene Oxide)-Based Solid Electrolytes in High-Voltage Lithium Batteries: Linear versus Network Polymers.” iScience 23, no. 6 (June 2020): 101225. https://doi.org/10.1016/j.isci.2020.101225.
52
+ 1. Huo, Hanyu, Jürgen Janek, and -. “Solid-State Batteries: From ‘All-Solid’ to ‘Almost-Solid.’” National Science Review 10, no. 6 (May 10, 2023): nwad098. https://doi.org/10.1093/nsr/nwad098.
53
+ 1. Huo, Hanyu, Ming Jiang, Boris Mogwitz, Joachim Sann, Yuriy Yusim, Tong‐Tong Zuo, Yannik Moryson, et al. “Interface Design Enabling Stable Polymer/Thiophosphate Electrolyte Separators for Dendrite‐Free Lithium Metal Batteries.” Angewandte Chemie International Edition 62, no. 14 (March 27, 2023): e202218044. https://doi.org/10.1002/anie.202218044.
54
+ 1. Ingber, Tjark T. K., Dominik Liebenau, Myra Biedermann, Martin Kolek, Diddo Diddens, Hans-Dieter Wiemhöfer, Andreas Heuer, Martin Winter, and Peter Bieker. “Increasing the Lithium Ion Mobility in Poly(Phosphazene)-Based Solid Polymer Electrolytes through Tailored Cation Doping.” Journal of The Electrochemical Society 168, no. 7 (July 1, 2021): 070559. https://doi.org/10.1149/1945-7111/ac148d.
55
+ 1. Joos, Markus, Christian Schneider, Andreas Münchinger, Igor Moudrakovski, Robert Usiskin, Joachim Maier, and Bettina V. Lotsch. “Impact of Hydration on Ion Transport in Li 2 Sn 2 S 5 · x H 2 O.” Journal of Materials Chemistry A 9, no. 30 (2021): 16532–44. https://doi.org/10.1039/D1TA04736A.
56
+ 1. Khudyshkina, Anna D., Andreas J. Butzelaar, Yiran Guo, Maxi Hoffmann, Thomas Bergfeldt, Mareen Schaller, Sylvio Indris, Manfred Wilhelm, Patrick Théato, and Fabian Jeschull. “From Lithium to Potassium: Comparison of Cations in Poly(Ethylene Oxide)-Based Block Copolymer Electrolytes for Solid-State Alkali Metal Batteries.” Electrochimica Acta 454 (June 2023): 142421. https://doi.org/10.1016/j.electacta.2023.142421.
57
+ 1. Khudyshkina, Anna D., Polina A. Morozova, Andreas J. Butzelaar, Maxi Hoffmann, Manfred Wilhelm, Patrick Theato, Stanislav S. Fedotov, and Fabian Jeschull. “Poly(Ethylene Oxide)-Based Electrolytes for Solid-State Potassium Metal Batteries with a Prussian Blue Positive Electrode.” ACS Applied Polymer Materials 4, no. 4 (April 8, 2022): 2734–46. https://doi.org/10.1021/acsapm.2c00014.
58
+ 1. Kinzer, Bryan, Andrew L. Davis, Thorben Krauskopf, Hannah Hartmann, William S. LePage, Eric Kazyak, Jürgen Janek, Neil P. Dasgupta, and Jeff Sakamoto. “Operando Analysis of the Molten Li|LLZO Interface: Understanding How the Physical Properties of Li Affect the Critical Current Density.” Matter 4, no. 6 (June 2021): 1947–61. https://doi.org/10.1016/j.matt.2021.04.016.
59
+ 1. Koeppe, Arnd, Franz Bamer, Michael Selzer, Britta Nestler, and Bernd Markert. “Explainable Artificial Intelligence for Mechanics: Physics-Explaining Neural Networks for Constitutive Models.” Frontiers in Materials 8 (February 2, 2022): 824958. https://doi.org/10.3389/fmats.2021.824958.
60
+ 1. Koeppe, Arnd, Franz Bamer, Michael Selzer, Britta Nestler, and Bernd Markert. “Workflow Concepts to Model Nonlinear Mechanics with Computational Intelligence.” PAMM 21, no. 1 (December 2021): e202100238. https://doi.org/10.1002/pamm.202100238.
61
+ 1. Krause, Daniel T., Susanna Krämer, Vassilios Siozios, Andreas J. Butzelaar, Martin Dulle, Beate Förster, Patrick Theato, et al. “Improved Route to Linear Triblock Copolymers by Coupling with Glycidyl Ether-Activated Poly(Ethylene Oxide) Chains.” Polymers 15, no. 9 (April 29, 2023): 2128. https://doi.org/10.3390/polym15092128.
62
+ 1. Kurzhals, Philipp, Felix Riewald, Matteo Bianchini, Shamail Ahmed, Andreas Michael Kern, Felix Walther, Heino Sommer, Kerstin Volz, and Jürgen Janek. “Deeper Understanding of the Lithiation Reaction during the Synthesis of LiNiO 2 Towards an Increased Production Throughput.” Journal of The Electrochemical Society 169, no. 5 (May 1, 2022): 050526. https://doi.org/10.1149/1945-7111/ac6c0b.
63
+ 1. Liang, Hai‐Peng, Zhen Chen, Xu Dong, Tatiana Zinkevich, Sylvio Indris, Stefano Passerini, and Dominic Bresser. “Photo‐Cross‐Linked Single‐Ion Conducting Polymer Electrolyte for Lithium‐Metal Batteries.” Macromolecular Rapid Communications 43, no. 12 (June 2022): 2100820. https://doi.org/10.1002/marc.202100820.
64
+ 1. Liang, Hai‐Peng, Maider Zarrabeitia, Zhen Chen, Sven Jovanovic, Steffen Merz, Josef Granwehr, Stefano Passerini, and Dominic Bresser. “Polysiloxane‐Based Single‐Ion Conducting Polymer Blend Electrolyte Comprising Small‐Molecule Organic Carbonates for High‐Energy and High‐Power Lithium‐Metal Batteries.” Advanced Energy Materials 12, no. 16 (April 2022): 2200013. https://doi.org/10.1002/aenm.202200013.
65
+ 1. Linz, Mario, Florian Bühner, Daniel Paulus, Lukas Hennerici, Yiran Guo, Valeriu Mereacre, Ulrich Mansfeld, Martin Seipenbusch, Jaroslaw Kita, and Ralf Moos. “Revealing the Deposition Mechanism of the Powder Aerosol Deposition Method Using Ceramic Oxide Core–Shell Particles.” Advanced Materials 36, no. 7 (February 2024): 2308294. https://doi.org/10.1002/adma.202308294.
66
+ 1. Lobe, Sandra, Alexander Bauer, Doris Sebold, Nadine Wettengl, Dina Fattakhova-Rohlfing, and Sven Uhlenbruck. “Sintering of Li-Garnets: Impact of Al-Incorporation and Powder-Bed Composition on Microstructure and Ionic Conductivity.” Open Ceramics 10 (June 2022): 100268. https://doi.org/10.1016/j.oceram.2022.100268.
67
+ 1. Lobe, Sandra, Alexander Bauer, Sven Uhlenbruck, and Dina Fattakhova‐Rohlfing. “Physical Vapor Deposition in Solid‐State Battery Development: From Materials to Devices.” Advanced Science 8, no. 11 (June 2021): 2002044. https://doi.org/10.1002/advs.202002044.
68
+ 1. Lohrberg, Oliver, Karsten Voigt, Sebastian Maletti, Henry Auer, Kristian Nikolowski, Christian Heubner, and Alexander Michaelis. “Benchmarking and Critical Design Considerations of Zero‐Excess Li‐Metal Batteries.” Advanced Functional Materials 33, no. 24 (June 2023): 2214891. https://doi.org/10.1002/adfm.202214891.
69
+ 1. Lombardo, Teo, Christine Kern, Joachim Sann, Marcus Rohnke, and Jürgen Janek. “Bridging the Gap: Electrode Microstructure and Interphase Characterization by Combining ToF‐SIMS and Machine Learning.” Advanced Materials Interfaces 10, no. 36 (December 2023): 2300640. https://doi.org/10.1002/admi.202300640.
70
+ 1. Loutati, A., Y. J. Sohn, and F. Tietz. “Phase‐field Determination of NaSICON Materials in the Quaternary System Na 2 O−P 2 O 5 −SiO 2 −ZrO 2 : The Series Na 3 Zr 3–x Si 2 P x O 11.5+x/2.” ChemPhysChem 22, no. 10 (May 17, 2021): 995–1007. https://doi.org/10.1002/cphc.202100032.
71
+ 1. Loutati, Asmaa, Olivier Guillon, Frank Tietz, and Dina Fattakhova-Rohlfing. “NaSICON-Type Solid-State Li+ Ion Conductors with Partial Polyanionic Substitution of Phosphate with Silicate.” Open Ceramics 12 (December 2022): 100313. https://doi.org/10.1016/j.oceram.2022.100313.
72
+ 1. Loutati, Asmaa, Philipp Odenwald, Burak Aktekin, Joachim Sann, Olivier Guillon, Frank Tietz, and Dina Fattakhova‐Rohlfing. “Survey of Zirconium‐Containing NaSICON‐type Solid‐State Li + Ion Conductors with the Aim of Increasing Reduction Stability by Partial Cation Substitution.” Batteries & Supercaps 5, no. 11 (November 2022): e202200327. https://doi.org/10.1002/batt.202200327.
73
+ 1. Ma, Qianli, Till Ortmann, Aikai Yang, Doris Sebold, Simon Burkhardt, Marcus Rohnke, Frank Tietz, Dina Fattakhova‐Rohlfing, Jürgen Janek, and Olivier Guillon. “Enhancing the Dendrite Tolerance of NaSICON Electrolytes by Suppressing Edge Growth of Na Electrode along Ceramic Surface.” Advanced Energy Materials 12, no. 40 (October 2022): 2201680. https://doi.org/10.1002/aenm.202201680.
74
+ 1. Malaki, Michael, Johannes Haust, Jean Philippe Beaupain, Henry Auer, Andreas Beyer, Katja Wätzig, Mihails Kusnezoff, and Kerstin Volz. “Probing the Interface Evolution in Co‐sintered All‐Phosphate Cathode‐Solid Electrolyte Composites.” Advanced Materials Interfaces 10, no. 35 (December 2023): 2300513. https://doi.org/10.1002/admi.202300513.
75
+ 1. Mann, Markus, Michael Küpers, Grit Häuschen, Martin Finsterbusch, Dina Fattakhova-Rohlfing, and Olivier Guillon. “Evaluation of Scalable Synthesis Methods for Aluminum-Substituted Li7La3Zr2O12 Solid Electrolytes.” Materials 14, no. 22 (November 11, 2021): 6809. https://doi.org/10.3390/ma14226809.
76
+ 1. Mann, Markus, Michael Küpers, Grit Häuschen, Martin Finsterbusch, Dina Fattakhova-Rohlfing, and Olivier Guillon. “The Influence of Hafnium Impurities on the Electrochemical Performance of Tantalum Substituted Li7La3Zr2O12 Solid Electrolytes.” Ionics 28, no. 1 (January 2022): 53–62. https://doi.org/10.1007/s11581-021-04300-w.
77
+ 1. Mann, Markus, Christian Schwab, Martin Ihrig, Martin Finsterbusch, Manfred Martin, Olivier Guillon, and Dina Fattakhova-Rohlfing. “Anhydrous LiNbO 3 Synthesis and Its Application for Surface Modification of Garnet Type Li-Ion Conductors.” Journal of The Electrochemical Society 169, no. 4 (April 1, 2022): 040564. https://doi.org/10.1149/1945-7111/ac6836.
78
+ 1. Mayer, Alexander, Tugce Ates, Alberto Varzi, Stefano Passerini, and Dominic Bresser. “Novel Sulfur-Doped Single-Ion Conducting Multi-Block Copolymer Electrolyte.” Frontiers in Chemistry 10 (August 23, 2022): 974202. https://doi.org/10.3389/fchem.2022.974202.
79
+ 1. Mereacre, Valeriu, Pirmin Stüble, Vanessa Trouillet, Shamail Ahmed, Kerstin Volz, and Joachim R. Binder. “Coating versus Doping: Understanding the Enhanced Performance of High‐Voltage Batteries by the Coating of Spinel LiNi 0.5 Mn 1.5 O 4 with Li 0.35 La 0.55 TiO 3.” Advanced Materials Interfaces 10, no. 2 (January 2023): 2201324. https://doi.org/10.1002/admi.202201324.
80
+ 1. Merz, Steffen, Jie Wang, Petrik Galvosas, and Josef Granwehr. “MAS-NMR of [Pyr13][Tf2N] and [Pyr16][Tf2N] Ionic Liquids Confined to Carbon Black: Insights and Pitfalls.” Molecules 26, no. 21 (November 5, 2021): 6690. https://doi.org/10.3390/molecules26216690.
81
+ 1. Minnmann, Philip, Lars Quillman, Simon Burkhardt, Felix H. Richter, and Jürgen Janek. “Editors’ Choice—Quantifying the Impact of Charge Transport Bottlenecks in Composite Cathodes of All-Solid-State Batteries.” Journal of The Electrochemical Society 168, no. 4 (April 1, 2021): 040537. https://doi.org/10.1149/1945-7111/abf8d7.
82
+ 1. Minnmann, Philip, Florian Strauss, Anja Bielefeld, Raffael Ruess, Philipp Adelhelm, Simon Burkhardt, Sören L. Dreyer, et al. “Designing Cathodes and Cathode Active Materials for Solid‐State Batteries.” Advanced Energy Materials 12, no. 35 (September 2022): 2201425. https://doi.org/10.1002/aenm.202201425.
83
+ 1. Molaiyan, Palanivel, Sarah E. Mailhiot, Kevin Voges, Anu M. Kantola, Tao Hu, Peter Michalowski, Arno Kwade, Ville-Veikko Telkki, and Ulla Lassi. “Investigation of the Structure and Ionic Conductivity of a Li3InCl6 Modified by Dry Room Annealing for Solid-State Li-Ion Battery Applications.” Materials & Design 227 (March 2023): 111690. https://doi.org/10.1016/j.matdes.2023.111690.
84
+ 1. Möller, Sören, Takahiro Satoh, Yasuyuki Ishii, Britta Teßmer, Rayan Guerdelli, Tomihiro Kamiya, Kazuhisa Fujita, et al. “Absolute Local Quantification of Li as Function of State-of-Charge in All-Solid-State Li Batteries via 2D MeV Ion-Beam Analysis.” Batteries 7, no. 2 (June 20, 2021): 41. https://doi.org/10.3390/batteries7020041.
85
+ 1. Mücke, Robert, Najma Yaqoob, Martin Finsterbusch, Fadi Al-Jaljouli, Payam Kaghazchi, Dina Fattakhova-Rohlfing, and Olivier Guillon. “Modelling Electro-Chemically Induced Stresses in All-Solid-State Batteries: Screening Electrolyte and Cathode Materials in Composite Cathodes.” Journal of Materials Chemistry A 11, no. 35 (2023): 18801–10. https://doi.org/10.1039/D3TA01729J.
86
+ 1. Nair, Jijeesh Ravi, Laura Imholt, Gunther Brunklaus, and Martin Winter. “Lithium Metal Polymer Electrolyte Batteries: Opportunities and Challenges.” The Electrochemical Society Interface 28, no. 2 (2019): 55–61. https://doi.org/10.1149/2.F05192if.
87
+ 1. Negi, Rajendra S., Yuriy Yusim, Ruijun Pan, Shamail Ahmed, Kerstin Volz, Ryo Takata, Franz Schmidt, Anja Henss, and Matthias T. Elm. “A Dry‐Processed Al 2 O 3 /LiAlO 2 Coating for Stabilizing the Cathode/Electrolyte Interface in High‐Ni NCM‐Based All‐Solid‐State Batteries.” Advanced Materials Interfaces 9, no. 8 (March 2022): 2101428. https://doi.org/10.1002/admi.202101428.
88
+ 1. Odenwald, Philipp, Qianli Ma, Bambar Davaasuren, Enkhtsetseg Dashjav, Frank Tietz, Michael Wolff, Wolfgang Rheinheimer, Sven Uhlenbruck, Olivier Guillon, and Dina Fattakhova‐Rohlfing. “The Impact of Lithium Tungstate on the Densification and Conductivity of Phosphate Lithium‐Ion Conductors.” ChemElectroChem 9, no. 5 (March 11, 2022): e202101366. https://doi.org/10.1002/celc.202101366.
89
+ 1. Ohno, Saneyuki, Tim Bernges, Johannes Buchheim, Marc Duchardt, Anna-Katharina Hatz, Marvin A. Kraft, Hiram Kwak, et al. “How Certain Are the Reported Ionic Conductivities of Thiophosphate-Based Solid Electrolytes? An Interlaboratory Study.” ACS Energy Letters 5, no. 3 (March 13, 2020): 910–15. https://doi.org/10.1021/acsenergylett.9b02764.
90
+ 1. Ortmann, Till, Simon Burkhardt, Janis Kevin Eckhardt, Till Fuchs, Ziming Ding, Joachim Sann, Marcus Rohnke, et al. “Kinetics and Pore Formation of the Sodium Metal Anode on NASICON‐Type Na 3.4 Zr 2 Si 2.4 P 0.6 O 12 for Sodium Solid‐State Batteries.” Advanced Energy Materials 13, no. 5 (February 2023): 2202712. https://doi.org/10.1002/aenm.202202712.
91
+ 1. Otto, Svenja‐K., Luise M. Riegger, Till Fuchs, Sven Kayser, Pascal Schweitzer, Simon Burkhardt, Anja Henss, and Jürgen Janek. “In Situ Investigation of Lithium Metal–Solid Electrolyte Anode Interfaces with ToF‐SIMS.” Advanced Materials Interfaces 9, no. 13 (May 2022): 2102387. https://doi.org/10.1002/admi.202102387.
92
+ 1. Pervez, Syed Atif, Guktae Kim, Bhaghavathi P. Vinayan, Musa A. Cambaz, Matthias Kuenzel, Maral Hekmatfar, Maximilian Fichtner, and Stefano Passerini. “Overcoming the Interfacial Limitations Imposed by the Solid–Solid Interface in Solid‐State Batteries Using Ionic Liquid‐Based Interlayers.” Small 16, no. 14 (April 2020): 2000279. https://doi.org/10.1002/smll.202000279.
93
+ 1. Plass, Maximilian A., Sebastian Bette, Nina Philipp, Igor Moundrakovski, Kathrin Küster, Robert E. Dinnebier, and Bettina V. Lotsch. “Influence of Synthesis and Substitution on the Structure and Ionic Transport Properties of Lithium Rare Earth Metal Halides.” Journal of Materials Chemistry A 11, no. 24 (2023): 13027–38. https://doi.org/10.1039/D3TA01327H.
94
+ 1. Plass, Maximilian A., Maxwell W. Terban, Tanja Scholz, Igor Moudrakovski, Viola Duppel, Robert E. Dinnebier, and Bettina V. Lotsch. “Structure and Ionic Conductivity of Li-Disordered Bismuth o -Thiophosphate Li 60–3 x Bi 16+ x (PS 4 ) 36.” Inorganic Chemistry 62, no. 27 (July 10, 2023): 10655–64. https://doi.org/10.1021/acs.inorgchem.3c01028.
95
+ 1. Pokle, Anuj, Daniel Weber, Matteo Bianchini, Jürgen Janek, and Kerstin Volz. “Probing the Ni(OH) 2 Precursor for LiNiO 2 at the Atomic Scale: Insights into the Origin of Structural Defect in a Layered Cathode Active Material.” Small 19, no. 4 (January 2023): 2205508. https://doi.org/10.1002/smll.202205508.
96
+ 1. Rajagopal, Deepalaxmi, Arnd Koeppe, Meysam Esmaeilpour, Michael Selzer, Wolfgang Wenzel, Helge Stein, and Britta Nestler. “Data‐Driven Virtual Material Analysis and Synthesis for Solid Electrolyte Interphases.” Advanced Energy Materials 13, no. 40 (October 2023): 2301985. https://doi.org/10.1002/aenm.202301985.
97
+ 1. Riegger, Luise M., Roman Schlem, Joachim Sann, Wolfgang G. Zeier, and Jürgen Janek. “Lithium‐Metal Anode Instability of the Superionic Halide Solid Electrolytes and the Implications for Solid‐State Batteries.” Angewandte Chemie International Edition 60, no. 12 (March 15, 2021): 6718–23. https://doi.org/10.1002/anie.202015238.
98
+ 1. Rosen, Melanie, Martin Finsterbusch, Olivier Guillon, and Dina Fattakhova-Rohlfing. “Free Standing Dual Phase Cathode Tapes – Scalable Fabrication and Microstructure Optimization of Garnet-Based Ceramic Cathodes.” Journal of Materials Chemistry A 10, no. 5 (2022): 2320–26. https://doi.org/10.1039/D1TA07194G.
99
+ 1. Rosen, Melanie, Ruijie Ye, Markus Mann, Sandra Lobe, Martin Finsterbusch, Olivier Guillon, and Dina Fattakhova-Rohlfing. “Controlling the Lithium Proton Exchange of LLZO to Enable Reproducible Processing and Performance Optimization.” Journal of Materials Chemistry A 9, no. 8 (2021): 4831–40. https://doi.org/10.1039/D0TA11096E.
100
+ 1. Rosenbach, Carolin, Felix Walther, Justine Ruhl, Matthias Hartmann, Theodoor Anton Hendriks, Saneyuki Ohno, Jürgen Janek, and Wolfgang G. Zeier. “Visualizing the Chemical Incompatibility of Halide and Sulfide‐Based Electrolytes in Solid‐State Batteries.” Advanced Energy Materials 13, no. 6 (February 2023): 2203673. https://doi.org/10.1002/aenm.202203673.
101
+ 1. Ruess, Raffael, Davide Gomboso, Mark A. Ulherr, Enrico Trevisanello, Yuan Ma, Aleksandr Kondrakov, Torsten Brezesinski, and Jürgen Janek. “Single-Crystalline LiNiO 2 as High-Capacity Cathode Active Material for Solid-State Lithium-Ion Batteries.” Journal of The Electrochemical Society, February 15, 2023. https://doi.org/10.1149/1945-7111/acbc4f.
102
+ 1. Ruess, Raffael, Mark A. Ulherr, Enrico Trevisanello, Steffen Schröder, Anja Henss, and Jürgen Janek. “Transition Metal Oxides and Li 2 CO 3 as Precursors for the Synthesis of Ni-Rich Single-Crystalline NCM for Sustainable Lithium-Ion Battery Production.” Journal of The Electrochemical Society 169, no. 7 (July 1, 2022): 070531. https://doi.org/10.1149/1945-7111/ac8242.
103
+ 1. Ruhl, Justine, Luise M. Riegger, Michael Ghidiu, and Wolfgang G. Zeier. “Impact of Solvent Treatment of the Superionic Argyrodite Li 6 PS 5 Cl on Solid‐State Battery Performance.” Advanced Energy and Sustainability Research 2, no. 2 (February 2021): 2000077. https://doi.org/10.1002/aesr.202000077.
104
+ 1. Scheld, Walter Sebastian, Kwangnam Kim, Christian Schwab, Alexandra C. Moy, Shi‐Kai Jiang, Markus Mann, Christian Dellen, et al. “The Riddle of Dark LLZO: Cobalt Diffusion in Garnet Separators of Solid‐State Lithium Batteries.” Advanced Functional Materials 33, no. 43 (October 2023): 2302939. https://doi.org/10.1002/adfm.202302939.
105
+ 1. Schiffmann, Nikolas, Ethel C. Bucharsky, Karl G. Schell, Charlotte A. Fritsch, Michael Knapp, and Michael J. Hoffmann. “Upscaling of LATP Synthesis: Stoichiometric Screening of Phase Purity and Microstructure to Ionic Conductivity Maps.” Ionics 27, no. 5 (May 2021): 2017–25. https://doi.org/10.1007/s11581-021-03961-x.
106
+ 1. Schlautmann, Eva, Alexander Weiß, Oliver Maus, Lukas Ketter, Moumita Rana, Sebastian Puls, Vera Nickel, et al. “Impact of the Solid Electrolyte Particle Size Distribution in Sulfide‐Based Solid‐State Battery Composites.” Advanced Energy Materials 13, no. 41 (November 2023): 2302309. https://doi.org/10.1002/aenm.202302309.
107
+ 1. Schlem, Roman, Christine Friederike Burmeister, Peter Michalowski, Saneyuki Ohno, Georg F. Dewald, Arno Kwade, and Wolfgang G. Zeier. “Energy Storage Materials for Solid‐State Batteries: Design by Mechanochemistry.” Advanced Energy Materials 11, no. 30 (August 2021): 2101022. https://doi.org/10.1002/aenm.202101022.
108
+ 1. Schmaltz, Thomas, Felix Hartmann, Tim Wicke, Lukas Weymann, Christoph Neef, and Jürgen Janek. “A Roadmap for Solid‐State Batteries.” Advanced Energy Materials 13, no. 43 (November 2023): 2301886. https://doi.org/10.1002/aenm.202301886.
109
+ 1. Schmieg, Barbara, Nico Brandt, Vera J. Schnepp, Luka Radosevic, Sarah Gretzinger, Michael Selzer, and Jürgen Hubbuch. “Structured Data Storage for Data-Driven Process Optimisation in Bioprinting.” Applied Sciences 12, no. 15 (August 1, 2022): 7728. https://doi.org/10.3390/app12157728.
110
+ 1. Schneider, Christian, Christoph P Schmidt, Anton Neumann, Moritz Clausnitzer, Marcel Sadowski, Sascha Harm, Christoph Meier, et al. “Effect of Particle Size and Pressure on the Transport Properties of the Fast Ion Conductor t‐Li7SiPS8.” Adv. Energy Mater., 2023.
111
+ 1. Schneider, Kirstin, Vivien Kiyek, Martin Finsterbusch, Bengi Yagmurlu, and Daniel Goldmann. “Acid Leaching of Al- and Ta-Substituted Li7La3Zr2O12 (LLZO) Solid Electrolyte.” Metals 13, no. 5 (April 24, 2023): 834. https://doi.org/10.3390/met13050834.
112
+ 1. Schneider, Stefanie, Lucas G. Balzat, Bettina V. Lotsch, and Wolfgang Schnick. “Structure Determination of the Crystalline LiPON Model Structure Li 5+ x P 2 O 6− x N 1+ x with x ≈0.9.” Chemistry – A European Journal 29, no. 9 (February 10, 2023): e202202984. https://doi.org/10.1002/chem.202202984.
113
+ 1. Schneider, Stefanie, Sandra T. Kreiner, Lucas G. Balzat, Bettina V. Lotsch, and Wolfgang Schnick. “Finding Order in Disorder: The Highly Disordered Lithium Oxonitridophosphate Double Salt Li 8+ x P 3 O 10− x N 1+ x ( x =1.4(5)).” Chemistry – A European Journal 29, no. 55 (October 2, 2023): e202301986. https://doi.org/10.1002/chem.202301986.
114
+ 1. Schneider, Stefanie, Eva‐Maria Wendinger, Volodymyr Baran, Anna‐Katharina Hatz, Bettina V. Lotsch, Markus Nentwig, Oliver Oeckler, Thomas Bräuniger, and Wolfgang Schnick. “Comprehensive Investigation of Anion Species in Crystalline Li + Ion Conductor Li 27− x [P 4 O 7+ x N 9− x ]O 3 ( x ≈1.9(3)).” Chemistry – A European Journal 29, no. 27 (May 11, 2023): e202300174. https://doi.org/10.1002/chem.202300174.
115
+ 1. Scholz, Tanja, Christian Schneider, Roland Eger, Viola Duppel, Igor Moudrakovski, Armin Schulz, Jürgen Nuss, and Bettina V. Lotsch. “Phase Formation through Synthetic Control: Polymorphism in the Sodium-Ion Solid Electrolyte Na 4 P 2 S 6.” Journal of Materials Chemistry A 9, no. 13 (2021): 8692–8703. https://doi.org/10.1039/D0TA11008F.
116
+ 1. Scholz, Tanja, Christian Schneider, Maxwell W. Terban, Zeyu Deng, Roland Eger, Martin Etter, Robert E. Dinnebier, Pieremanuele Canepa, and Bettina V. Lotsch. “Order-Disorder Transition Driven Superionic Conduction in the New Plastic Polymorph of Na4P2S6.” Preprint. Chemistry, December 21, 2021. https://doi.org/10.26434/chemrxiv-2021-7r31q.
117
+ 1. Scholz, Tanja, Christian Schneider, Maxwell W. Terban, Zeyu Deng, Roland Eger, Martin Etter, Robert E. Dinnebier, Pieremanuele Canepa, and Bettina V. Lotsch. “Superionic Conduction in the Plastic Crystal Polymorph of Na 4 P 2 S 6.” ACS Energy Letters 7, no. 4 (April 8, 2022): 1403–11. https://doi.org/10.1021/acsenergylett.1c02815.
118
+ 1. Schreiber, Andrea, Melanie Rosen, Katja Waetzig, Kristian Nikolowski, Nikolas Schiffmann, Hartmut Wiggers, Michael Küpers, et al. “Oxide Ceramic Electrolytes for All-Solid-State Lithium Batteries – Cost-Cutting Cell Design and Environmental Impact.” Green Chemistry 25, no. 1 (2023): 399–414. https://doi.org/10.1039/D2GC03368B.
119
+ 1. Schwab, Christian, Grit Häuschen, Markus Mann, Christoph Roitzheim, Olivier Guillon, Dina Fattakhova-Rohlfing, and Martin Finsterbusch. “Towards Economic Processing of High Performance Garnets – Case Study on Zero Li Excess Ga-Substituted LLZO.” Journal of Materials Chemistry A 11, no. 11 (2023): 5670–80. https://doi.org/10.1039/D2TA09250F.
120
+ 1. Schwich, Lilian, Michael Küpers, Martin Finsterbusch, Andrea Schreiber, Dina Fattakhova-Rohlfing, Olivier Guillon, and Bernd Friedrich. “Recycling Strategies for Ceramic All-Solid-State Batteries—Part I: Study on Possible Treatments in Contrast to Li-Ion Battery Recycling.” Metals 10, no. 11 (November 17, 2020): 1523. https://doi.org/10.3390/met10111523.
121
+ 1. Sen, Sudeshna, Felix H. Richter, and -. “Typology of Battery Cells – From Liquid to Solid Electrolytes.” Advanced Science 10, no. 33 (November 2023): 2303985. https://doi.org/10.1002/advs.202303985.
122
+ 1. Shi, Bing‐Xuan, Yuriy Yusim, Sudeshna Sen, Thomas Demuth, Raffael Ruess, Kerstin Volz, Anja Henss, and Felix H. Richter. “Mitigating Contact Loss in Li 6 PS 5 Cl‐Based Solid‐State Batteries Using a Thin Cationic Polymer Coating on NCM.” Advanced Energy Materials 13, no. 24 (June 2023): 2300310. https://doi.org/10.1002/aenm.202300310.
123
+ 1. Shi, Junli, Huu-Dat Nguyen, Zhen Chen, Rui Wang, Dominik Steinle, Lester Barnsley, Jie Li, et al. “Nanostructured Block Copolymer Single-Ion Conductors for Low-Temperature, High-Voltage and Fast Charging Lithium-Metal Batteries.” Energy Materials 3, no. 4 (July 21, 2023). https://doi.org/10.20517/energymater.2023.27.
124
+ 1. Singh, Dheeraj Kumar, Till Fuchs, Christian Krempaszky, Boris Mogwitz, Simon Burkhardt, Felix H. Richter, and Jürgen Janek. “Overcoming Anode Instability in Solid‐State Batteries through Control of the Lithium Metal Microstructure.” Advanced Functional Materials 33, no. 1 (January 2023): 2211067. https://doi.org/10.1002/adfm.202211067.
125
+ 1. Singh, Dheeraj Kumar, Till Fuchs, Christian Krempaszky, Boris Mogwitz, and Jürgen Janek. “Non‐Linear Kinetics of The Lithium Metal Anode on Li 6 PS 5 Cl at High Current Density: Dendrite Growth and the Role of Lithium Microstructure on Creep.” Advanced Science 10, no. 22 (August 2023): 2302521. https://doi.org/10.1002/advs.202302521.
126
+ 1. Singh, Dheeraj Kumar, Anja Henss, Boris Mogwitz, Ajay Gautam, Jonas Horn, Thorben Krauskopf, Simon Burkhardt, Joachim Sann, Felix H. Richter, and Jürgen Janek. “Li6PS5Cl Microstructure and Influence on Dendrite Growth in Solid-State Batteries with Lithium Metal Anode.” Cell Reports Physical Science 3, no. 9 (September 2022): 101043. https://doi.org/10.1016/j.xcrp.2022.101043.
127
+ 1. Sinzig, Stephan, Thomas Hollweck, Christoph P. Schmidt, and Wolfgang A. Wall. “A Finite Element Formulation to Three-Dimensionally Resolve Space-Charge Layers in Solid Electrolytes.” Journal of The Electrochemical Society 170, no. 4 (April 1, 2023): 040513. https://doi.org/10.1149/1945-7111/acc692.
128
+ 1. Sinzig, Stephan, Christoph P. Schmidt, and Wolfgang A. Wall. “An Efficient Approach to Include Transport Effects in Thin Coating Layers in Electrochemo-Mechanical Models for All-Solid-State Batteries.” Journal of The Electrochemical Society 170, no. 10 (October 1, 2023): 100532. https://doi.org/10.1149/1945-7111/ad0264.
129
+ 1. Steinle, Dominik, Zhen Chen, Huu-Dat Nguyen, Matthias Kuenzel, Cristina Iojoiu, Stefano Passerini, and Dominic Bresser. “Single-Ion Conducting Polymer Electrolyte for Li||LiNi0.6Mn0.2Co0.2O2 Batteries—Impact of the Anodic Cutoff Voltage and Ambient Temperature.” Journal of Solid State Electrochemistry 26, no. 1 (January 2022): 97–102. https://doi.org/10.1007/s10008-020-04895-6.
130
+ 1. Stolz, Lukas, Sebastian Hochstädt, Stephan Röser, Michael Ryan Hansen, Martin Winter, and Johannes Kasnatscheew. “Single-Ion versus Dual-Ion Conducting Electrolytes: The Relevance of Concentration Polarization in Solid-State Batteries.” ACS Appl. Mater. Interfaces, 2022.
131
+ 1. Stolz, Lukas, Gerrit Homann, Martin Winter, and Johannes Kasnatscheew. “Area Oversizing of Lithium Metal Electrodes in Solid‐State Batteries: Relevance for Overvoltage and Thus Performance?” ChemSusChem 14, no. 10 (May 20, 2021): 2163–69. https://doi.org/10.1002/cssc.202100213.
132
+ 1. Stolz, Lukas, Gerrit Homann, Martin Winter, and Johannes Kasnatscheew. “Kinetical Threshold Limits in Solid-State Lithium Batteries: Data on Practical Relevance of Sand Equation.” Data in Brief 34 (February 2021): 106688. https://doi.org/10.1016/j.dib.2020.106688.
133
+ 1. Stolz, Lukas, Gerrit Homann, Martin Winter, and Johannes Kasnatscheew. “Realizing Poly(Ethylene Oxide) as a Polymer for Solid Electrolytes in High Voltage Lithium Batteries via Simple Modification of the Cell Setup.” Materials Advances 2, no. 10 (2021): 3251–56. https://doi.org/10.1039/D1MA00009H.
134
+ 1. Stolz, Lukas, Gerrit Homann, Martin Winter, and Johannes Kasnatscheew. “The Sand Equation and Its Enormous Practical Relevance for Solid-State Lithium Metal Batteries.” Materials Today 44 (April 2021): 9–14. https://doi.org/10.1016/j.mattod.2020.11.025.
135
+ 1. Stolz, Lukas, Stephan Röser, Gerrit Homann, Martin Winter, and Johannes Kasnatscheew. “Pragmatic Approaches to Correlate between the Physicochemical Properties of a Linear Poly(Ethylene Oxide)-Based Solid Polymer Electrolyte and the Performance in a High-Voltage Li-Metal Battery.” The Journal of Physical Chemistry C 125, no. 33 (August 26, 2021): 18089–97. https://doi.org/10.1021/acs.jpcc.1c03614.
136
+ 1. Tian, Guiying, Zijian Zhao, Tatiana Zinkevich, Katharina Elies, Frieder Scheiba, and Helmut Ehrenberg. “A Crosslinked Polyethyleneglycol Solid Electrolyte Dissolving Lithium Bis(Trifluoromethylsulfonyl)Imide for Rechargeable Lithium Batteries.” ChemSusChem 12, no. 20 (October 21, 2019): 4708–18. https://doi.org/10.1002/cssc.201901587.
137
+ 1. Vijayakumar, Vidyanand, Bihag Anothumakkool, Sreekumar Kurungot, Martin Winter, and Jijeesh Ravi Nair. “In Situ Polymerization Process: An Essential Design Tool for Lithium Polymer Batteries.” Energy & Environmental Science 14, no. 5 (2021): 2708–88. https://doi.org/10.1039/D0EE03527K.
138
+ 1. Vijayakumar, Vidyanand, Meena Ghosh, Kiran Asokan, Santhosh Babu Sukumaran, Sreekumar Kurungot, Jonas Mindemark, Daniel Brandell, Martin Winter, and Jijeesh Ravi Nair. “2D Layered Nanomaterials as Fillers in Polymer Composite Electrolytes for Lithium Batteries.” Advanced Energy Materials 13, no. 15 (April 2023): 2203326. https://doi.org/10.1002/aenm.202203326.
139
+ 1. Vinnichenko, Mykola, Katja Waetzig, Alf Aurich, Christoph Baumgaertner, Mathias Herrmann, Chang Won Ho, Mihails Kusnezoff, and Chang Woo Lee. “Li-Ion Conductive Li1.3Al0.3Ti1.7(PO4)3 (LATP) Solid Electrolyte Prepared by Cold Sintering Process with Various Sintering Additives.” Nanomaterials 12, no. 18 (September 13, 2022): 3178. https://doi.org/10.3390/nano12183178.
140
+ 1. Waetzig, Katja, Christian Heubner, and Mihails Kusnezoff. “Reduced Sintering Temperatures of Li+ Conductive Li1.3Al0.3Ti1.7(PO4)3 Ceramics.” Crystals 10, no. 5 (May 20, 2020): 408. https://doi.org/10.3390/cryst10050408.
141
+ 1. Waidha, Aamir Iqbal, Amila Salihovic, Martine Jacob, Vanita Vanita, Burak Aktekin, Kristina Brix, Kerstin Wissel, et al. “Recycling of All‐Solid‐State Li‐ion Batteries: A Case Study of the Separation of Individual Components Within a System Composed of LTO, LLZTO and NMC**.” ChemSusChem 16, no. 13 (July 7, 2023): e202202361. https://doi.org/10.1002/cssc.202202361.
142
+ 1. Wandelt, Sophia L., Alexander Mutschke, Dmitry Khalyavin, Robert Calaminus, Jennifer Steinadler, Bettina V. Lotsch, and Wolfgang Schnick. “Combining Nitridoborates, Nitrides and Hydrides—Synthesis and Characterization of the Multianionic Sr 6 N[BN 2 ] 2 H 3.” Angewandte Chemie International Edition 62, no. 50 (December 11, 2023): e202313564. https://doi.org/10.1002/anie.202313564.
143
+ 1. Wang, Shuo, Mingxue Tang, Qinghua Zhang, Baohua Li, Saneyuki Ohno, Felix Walther, Ruijun Pan, et al. “Lithium Argyrodite as Solid Electrolyte and Cathode Precursor for Solid‐State Batteries with Long Cycle Life.” Advanced Energy Materials 11, no. 31 (August 2021): 2101370. https://doi.org/10.1002/aenm.202101370.
144
+ 1. Wang, Shuo, Wenbo Zhang, Xiang Chen, Dyuman Das, Raffael Ruess, Ajay Gautam, Felix Walther, et al. “Influence of Crystallinity of Lithium Thiophosphate Solid Electrolytes on the Performance of Solid‐State Batteries.” Advanced Energy Materials 11, no. 24 (June 2021): 2100654. https://doi.org/10.1002/aenm.202100654.
145
+ 1. Wang, Shuo, Xue Zhang, Sijie Liu, Chengzhou Xin, Chuanjiao Xue, Felix Richter, Liangliang Li, et al. “High-Conductivity Free-Standing Li6PS5Cl/Poly(Vinylidene Difluoride) Composite Solid Electrolyte Membranes for Lithium-Ion Batteries.” Journal of Materiomics 6, no. 1 (March 2020): 70–76. https://doi.org/10.1016/j.jmat.2019.12.010.
146
+ 1. Wei, Zhixuan, Ruben Maile, Luise M. Riegger, Marcus Rohnke, Klaus Müller‐Buschbaum, and Jürgen Janek. “Ionic Liquid‐Incorporated Metal‐Organic Framework with High Magnesium Ion Conductivity for Quasi‐Solid‐State Magnesium Batteries.” Batteries & Supercaps 5, no. 12 (December 2022): e202200318. https://doi.org/10.1002/batt.202200318.
147
+ 1. Wei, Zhixuan, Dheeraj Kumar Singh, Katharina Helmbrecht, Joachim Sann, Yuriy Yusim, Joy A. Kieser, Clarissa Glaser, Marcus Rohnke, Axel Groß, and Jürgen Janek. “In Situ Observation of Room‐Temperature Magnesium Metal Deposition on a NASICON/IL Hybrid Solid Electrolyte.” Advanced Energy Materials 13, no. 44 (November 2023): 2302525. https://doi.org/10.1002/aenm.202302525.
148
+ 1. Weiss, Manuel, Fabian J. Simon, Martin R. Busche, Takashi Nakamura, Daniel Schröder, Felix H. Richter, and Jürgen Janek. “From Liquid- to Solid-State Batteries: Ion Transfer Kinetics of Heteroionic Interfaces.” Electrochemical Energy Reviews 3, no. 2 (June 2020): 221–38. https://doi.org/10.1007/s41918-020-00062-7.
149
+ 1. Wissel, Kerstin, Luise M. Riegger, Christian Schneider, Aamir I. Waidha, Theodosios Famprikis, Yuji Ikeda, Blazej Grabowski, et al. “Dissolution and Recrystallization Behavior of Li 3 PS 4 in Different Organic Solvents with a Focus on N -Methylformamide.” ACS Applied Energy Materials 6, no. 15 (August 14, 2023): 7790–7802. https://doi.org/10.1021/acsaem.2c03278.
150
+ 1. Ye, Ruijie, Martin Ihrig, Egbert Figgemeier, Dina Fattakhova-Rohlfing, and Martin Finsterbusch. “Aqueous Processing of LiCoO 2 –Li 6.6 La 3 Zr 1.6 Ta 0.4 O 12 Composite Cathode for High-Capacity Solid-State Lithium Batteries.” ACS Sustainable Chemistry & Engineering 11, no. 13 (April 3, 2023): 5184–94. https://doi.org/10.1021/acssuschemeng.2c07556.
151
+ 1. Yusim, Yuriy, Dirk F. Hunstock, Alexander Mayer, Dominic Bresser, Stefano Passerini, Jürgen Janek, and Anja Henss. “Investigation of the Stability of the Poly(Ethylene Oxide)|LiNi 1‐x‐y Co x Mn y O 2 Interface in Solid‐State Batteries.” Advanced Materials Interfaces 11, no. 3 (January 2024): 2300532. https://doi.org/10.1002/admi.202300532.
152
+ 1. Yusim, Yuriy, Enrico Trevisanello, Raffael Ruess, Felix H. Richter, Alexander Mayer, Dominic Bresser, Stefano Passerini, Jürgen Janek, and Anja Henss. “Evaluation and Improvement of the Stability of Poly(Ethylene Oxide)‐based Solid‐state Batteries with High‐Voltage Cathodes.” Angewandte Chemie International Edition 62, no. 12 (March 13, 2023): e202218316. https://doi.org/10.1002/anie.202218316.
153
+ 1. Zhao, Yinghan, Patrick Altschuh, Jay Santoki, Lars Griem, Giovanna Tosato, Michael Selzer, Arnd Koeppe, and Britta Nestler. “Characterization of Porous Membranes Using Artificial Neural Networks.” Acta Materialia 253 (July 2023): 118922. https://doi.org/10.1016/j.actamat.2023.118922.
154
+ 1. Zhao, Yinghan, Svenja-K. Otto, Nico Brandt, Michael Selzer, and Britta Nestler. “Application of Random Forests in ToF-SIMS Data.” Procedia Computer Science 176 (2020): 410–19. https://doi.org/10.1016/j.procs.2020.08.042.
155
+ 1. Zhao, Yinghan, Svenja-K. Otto, Teo Lombardo, Anja Henss, Arnd Koeppe, Michael Selzer, Jürgen Janek, and Britta Nestler. “Identification of Lithium Compounds on Surfaces of Lithium Metal Anode with Machine-Learning-Assisted Analysis of ToF-SIMS Spectra.” ACS Applied Materials & Interfaces 15, no. 43 (November 1, 2023): 50469–78. https://doi.org/10.1021/acsami.3c09643.
156
+ 1. Zhao, Yinghan, Nikolas Schiffmann, Arnd Koeppe, Nico Brandt, Ethel C. Bucharsky, Karl G. Schell, Michael Selzer, and Britta Nestler. “Machine Learning Assisted Design of Experiments for Solid State Electrolyte Lithium Aluminum Titanium Phosphate.” Frontiers in Materials 9 (February 3, 2022): 821817. https://doi.org/10.3389/fmats.2022.821817.
157
+ 1. Zhu, Chao, Till Fuchs, Stefan A. L. Weber, Felix. H. Richter, Gunnar Glasser, Franjo Weber, Hans-Jürgen Butt, Jürgen Janek, and Rüdiger Berger. “Understanding the Evolution of Lithium Dendrites at Li6.25Al0.25La3Zr2O12 Grain Boundaries via Operando Microscopy Techniques.” Nature Communications 14, no. 1 (March 9, 2023): 1300. https://doi.org/10.1038/s41467-023-36792-7.
158
+ 1. Zuo, Tong‐Tong, Felix Walther, Jun Hao Teo, Raffael Rueß, Yubo Wang, Marcus Rohnke, Daniel Schröder, Linda F. Nazar, and Jürgen Janek. “Impact of the Chlorination of Lithium Argyrodites on the Electrolyte/Cathode Interface in Solid‐State Batteries.” Angewandte Chemie International Edition 62, no. 7 (February 6, 2023): e202213228. https://doi.org/10.1002/anie.202213228.
159
+ 1. Kadi4Mat help page: https://kadi.iam.kit.edu/
160
+ 1. FestBatt web page: https://festbatt.net/
paper_list.py ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ paper_list_str = """1. Ahmed, Shamail, Matteo Bianchini, Anuj Pokle, Manveer Singh Munde, Pascal Hartmann, Torsten Brezesinski, Andreas Beyer, Jürgen Janek, and Kerstin Volz. “Visualization of Light Elements Using 4D STEM: The Layered‐to‐Rock Salt Phase Transition in LiNiO 2 Cathode Material.” Advanced Energy Materials 10, no. 25 (July 2020): 2001026. https://doi.org/10.1002/aenm.202001026.
2
+ 1. Ahmed, Shamail, Anuj Pokle, Matteo Bianchini, Simon Schweidler, Andreas Beyer, Torsten Brezesinski, Jürgen Janek, and Kerstin Volz. “Understanding the Formation of Antiphase Boundaries in Layered Oxide Cathode Materials and Their Evolution upon Electrochemical Cycling.” Matter 4, no. 12 (December 2021): 3953–66. https://doi.org/10.1016/j.matt.2021.10.001.
3
+ 1. Aktekin, Burak, Luise M. Riegger, Svenja-K. Otto, Till Fuchs, Anja Henss, and Jürgen Janek. “SEI Growth on Lithium Metal Anodes in Solid-State Batteries Quantified with Coulometric Titration Time Analysis.” Nature Communications 14, no. 1 (October 31, 2023): 6946. https://doi.org/10.1038/s41467-023-42512-y.
4
+ 1. Ali, Md Yusuf, Hans Orthner, and Hartmut Wiggers. “Spray Flame Synthesis (SFS) of Lithium Lanthanum Zirconate (LLZO) Solid Electrolyte.” Materials 14, no. 13 (June 22, 2021): 3472. https://doi.org/10.3390/ma14133472.
5
+ 1. Batzer, Mattis, Carina Heck, Peter Michalowski, and Arno Kwade. “Current Status of Formulations and Scalable Processes for Producing Sulfidic Solid‐State Batteries.” Batteries & Supercaps 5, no. 12 (December 2022): e202200328. https://doi.org/10.1002/batt.202200328.
6
+ 1. Bauer, Alexander, Christoph Roitzheim, Sandra Lobe, Yoo Jung Sohn, Doris Sebold, Walter Sebastian Scheld, Martin Finsterbusch, Olivier Guillon, Dina Fattakhova-Rohlfing, and Sven Uhlenbruck. “Impact of Ni–Mn–Co–Al-Based Cathode Material Composition on the Sintering with Garnet Solid Electrolytes for All-Solid-State Batteries.” Chemistry of Materials 35, no. 21 (November 14, 2023): 8958–68. https://doi.org/10.1021/acs.chemmater.3c01573.
7
+ 1. Beaupain, Jean Philippe, Katja Waetzig, Svenja-Katharina Otto, Anja Henss, Jürgen Janek, Michael Malaki, Anuj Pokle, et al. “Reaction of Li 1.3 Al 0.3 Ti 1.7 (PO 4 ) 3 and LiNi 0.6 Co 0.2 Mn 0.2 O 2 in Co-Sintered Composite Cathodes for Solid-State Batteries.” ACS Applied Materials & Interfaces 13, no. 40 (October 13, 2021): 47488–98. https://doi.org/10.1021/acsami.1c11750.
8
+ 1. Becker-Steinberger, Katharina, Simon Schardt, Birger Horstmann, and Arnulf Latz. “Statics and Dynamics of Space-Charge-Layers in Polarized Inorganic Solid Electrolytes.” arXiv, January 25, 2021. http://arxiv.org/abs/2101.10294.
9
+ 1. Bielefeld, Anja, Dominik A. Weber, Raffael Rueß, Vedran Glavas, and Jürgen Janek. “Influence of Lithium Ion Kinetics, Particle Morphology and Voids on the Electrochemical Performance of Composite Cathodes for All-Solid-State Batteries.” Journal of The Electrochemical Society 169, no. 2 (February 1, 2022): 020539. https://doi.org/10.1149/1945-7111/ac50df.
10
+ 1. Borzutzki, Kristina, Dengpan Dong, Christian Wölke, Margarita Kruteva, Annika Stellhorn, Martin Winter, Dmitry Bedrov, and Gunther Brunklaus. “Small Groups, Big Impact: Eliminating Li+ Traps in Single-Ion Conducting Polymer Electrolytes.” iScience 23, no. 8 (August 2020): 101417. https://doi.org/10.1016/j.isci.2020.101417.
11
+ 1. Borzutzki, Kristina, Kang Dong, Jijeesh Ravi Nair, Beatrice Wolff, Florian Hausen, Rüdiger-A. Eichel, Martin Winter, Ingo Manke, and Gunther Brunklaus. “Lithium Deposition in Single-Ion Conducting Polymer Electrolytes.” Cell Reports Physical Science 2, no. 7 (July 2021): 100496. https://doi.org/10.1016/j.xcrp.2021.100496.
12
+ 1. Borzutzki, Kristina, Jijeesh Ravi Nair, Martin Winter, and Gunther Brunklaus. “Does Cell Polarization Matter in Single-Ion Conducting Electrolytes?” ACS Applied Materials & Interfaces 14, no. 4 (February 2, 2022): 5211–22. https://doi.org/10.1021/acsami.1c19097.
13
+ 1. Borzutzki, Kristina, Martin Winter, and Gunther Brunklaus. “Improving the NMC111∣Polymer Electrolyte Interface by Cathode Composition and Processing.” Journal of The Electrochemical Society 167, no. 7 (January 5, 2020): 070546. https://doi.org/10.1149/1945-7111/ab7fb5.
14
+ 1. Brandt, Nico, Nikolay T. Garabedian, Ephraim Schoof, Paul J. Schreiber, Philipp Zschumme, Christian Greiner, and Michael Selzer. “Managing FAIR Tribological Data Using Kadi4Mat.” Data 7, no. 2 (January 25, 2022): 15. https://doi.org/10.3390/data7020015.
15
+ 1. Brandt, Nico, Lars Griem, Christoph Herrmann, Ephraim Schoof, Giovanna Tosato, Yinghan Zhao, Philipp Zschumme, and Michael Selzer. “Kadi4Mat: A Research Data Infrastructure for Materials Science.” Data Science Journal 20 (February 10, 2021): 8. https://doi.org/10.5334/dsj-2021-008.
16
+ 1. Bresser, Dominic, Sandrine Lyonnard, Cristina Iojoiu, Lionel Picard, and Stefano Passerini. “Decoupling Segmental Relaxation and Ionic Conductivity for Lithium-Ion Polymer Electrolytes.” Molecular Systems Design & Engineering 4, no. 4 (2019): 779–92. https://doi.org/10.1039/C9ME00038K.
17
+ 1. Burmeister, Christine Friederike, Moritz Hofer, Palanivel Molaiyan, Peter Michalowski, and Arno Kwade. “Characterization of Stressing Conditions in a High Energy Ball Mill by Discrete Element Simulations.” Processes 10, no. 4 (April 1, 2022): 692. https://doi.org/10.3390/pr10040692.
18
+ 1. Butzelaar, Andreas J., Sven Schneider, Edgar Molle, and Patrick Theato. “Synthesis and Post‐Polymerization Modification of Defined Functional Poly(Vinyl Ether)s.” Macromolecular Rapid Communications 42, no. 13 (July 2021): 2100133. https://doi.org/10.1002/marc.202100133.
19
+ 1. Butzelaar, Andreas Johannes. “Poly(ethylene oxide)-based Architectures as Polymer Electrolytes for Solid-State Lithium-Metal Batteries,” 2022.
20
+ 1. Butzelaar, Andreas Johannes, Martin Gauthier-Jaques, Kun Ling Liu, Gunther Brunklaus, Martin Winter, and Patrick Theato. “The Power of Architecture – Cage-Shaped PEO and Its Application as a Polymer Electrolyte.” Polymer Chemistry, 2021.
21
+ 1. Chen, Yi‐Hsuan, Yi‐Chen Hsieh, Kun Ling Liu, Lennart Wichmann, Johannes Helmut Thienenkamp, Aditya Choudhary, Dmitry Bedrov, Martin Winter, and Gunther Brunklaus. “Green Polymer Electrolytes Based on Polycaprolactones for Solid‐State High‐Voltage Lithium Metal Batteries.” Macromolecular Rapid Communications 43, no. 20 (October 2022): 2200335. https://doi.org/10.1002/marc.202200335.
22
+ 1. Chen, Yi‐Hsuan, Peter Lennartz, Kun Ling Liu, Yi‐Chen Hsieh, Felix Scharf, Rayan Guerdelli, Annika Buchheit, et al. “Towards All‐Solid‐State Polymer Batteries: Going Beyond PEO with Hybrid Concepts.” Advanced Functional Materials 33, no. 32 (August 2023): 2300501. https://doi.org/10.1002/adfm.202300501.
23
+ 1. Chen, Zhen, Huu‐Dat Nguyen, Maider Zarrabeitia, Hai‐Peng Liang, Dorin Geiger, Jae‐Kwang Kim, Ute Kaiser, Stefano Passerini, Cristina Iojoiu, and Dominic Bresser. “Lithium Phosphonate Functionalized Polymer Coating for High‐Energy Li[Ni 0.8 Co 0.1 Mn 0.1 ]O 2 with Superior Performance at Ambient and Elevated Temperatures.” Advanced Functional Materials 31, no. 41 (October 2021): 2105343. https://doi.org/10.1002/adfm.202105343.
24
+ 1. Chiou, Min-Huei, Elisabeth Verweyen, Diddo Diddens, Lennart Wichmann, Christina Schmidt, Kerstin Neuhaus, Aditya Choudhary, Dmitry Bedrov, Martin Winter, and Gunther Brunklaus. “Selection of Polymer Segment Species Matters for Electrolyte Properties and Performance in Lithium Metal Batteries.” ACS Applied Energy Materials 6, no. 8 (April 24, 2023): 4422–36. https://doi.org/10.1021/acsaem.3c00571.
25
+ 1. Conforto, Gioele, Raffael Ruess, Daniel Schröder, Enrico Trevisanello, Roberto Fantin, Felix H. Richter, and Jürgen Janek. “Editors’ Choice—Quantification of the Impact of Chemo-Mechanical Degradation on the Performance and Cycling Stability of NCM-Based Cathodes in Solid-State Li-Ion Batteries.” Journal of The Electrochemical Society 168, no. 7 (July 1, 2021): 070546. https://doi.org/10.1149/1945-7111/ac13d2.
26
+ 1. Demuth, Thomas, Till Fuchs, Andreas Beyer, Jürgen Janek, and Kerstin Volz. “‘Depo-All-around’: A Novel FIB-Based TEM Specimen Preparation Technique for Solid State Battery Composites and Other Loosely Bound Samples.” Ultramicroscopy 257 (March 2024): 113904. https://doi.org/10.1016/j.ultramic.2023.113904.
27
+ 1. Dong, Xu, Xu Liu, Jin Han, Zhen Chen, Huang Zhang, Stefano Passerini, and Dominic Bresser. “Synthesis and Application of an Aromatic Sulfonate Sodium Salt for Aqueous Sodium‐Ion Battery Electrolytes.” Energy Technology 11, no. 1 (January 2023): 2201045. https://doi.org/10.1002/ente.202201045.
28
+ 1. Eckhardt, Janis K., Simon Burkhardt, Julian Zahnow, Matthias T. Elm, Jürgen Janek, Peter J. Klar, and Christian Heiliger. “Understanding the Impact of Microstructure on Charge Transport in Polycrystalline Materials Through Impedance Modelling.” Journal of The Electrochemical Society 168, no. 9 (September 1, 2021): 090516. https://doi.org/10.1149/1945-7111/ac1cfe.
29
+ 1. Eckhardt, Janis K., Till Fuchs, Simon Burkhardt, Peter J. Klar, Jürgen Janek, and Christian Heiliger. “Guidelines for Impedance Analysis of Parent Metal Anodes in Solid‐State Batteries and the Role of Current Constriction at Interface Voids, Heterogeneities, and SEI.” Advanced Materials Interfaces 10, no. 8 (March 2023): 2202354. https://doi.org/10.1002/admi.202202354.
30
+ 1. Erhard, Linus C., Jochen Rohrer, Karsten Albe, and Volker L. Deringer. “A Machine-Learned Interatomic Potential for Silica and Its Relation to Empirical Models.” Npj Computational Materials 8, no. 1 (April 28, 2022): 90. https://doi.org/10.1038/s41524-022-00768-w.
31
+ 1. Erhard, Linus C., Jochen Rohrer, Karsten Albe, and Volker L. Deringer. “Modelling Atomic and Nanoscale Structure in the Silicon-Oxygen System through Active Machine Learning.” arXiv, September 7, 2023. http://arxiv.org/abs/2309.03587.
32
+ 1. Falco, M., S. Palumbo, G. Lingua, L. Silvestri, M. Winter, R. Lin, V. Pellegrini, F. Bonaccorso, Jijeesh R. Nair, and C. Gerbaldi. “A Bilayer Polymer Electrolyte Encompassing Pyrrolidinium-Based RTIL for Binder-Free Silicon Few-Layer Graphene Nanocomposite Anodes for Li-Ion Battery.” Electrochemistry Communications 118 (September 2020): 106807. https://doi.org/10.1016/j.elecom.2020.106807.
33
+ 1. Fritsch, Charlotte, Anna-Lena Hansen, Sylvio Indris, Michael Knapp, and Helmut Ehrenberg. “Mechanochemical Synthesis of Amorphous and Crystalline Na 2 P 2 S 6 – Elucidation of Local Structural Changes by X-Ray Total Scattering and NMR.” Dalton Transactions 49, no. 5 (2020): 1668–73. https://doi.org/10.1039/C9DT04777H.
34
+ 1. Fritsch, Charlotte, Tatiana Zinkevich, Sylvio Indris, Martin Etter, Volodymyr Baran, Thomas Bergfeldt, Michael Knapp, Helmut Ehrenberg, and Anna-Lena Hansen. “Garnet to Hydrogarnet: Effect of Post Synthesis Treatment on Cation Substituted LLZO Solid Electrolyte and Its Effect on Li Ion Conductivity.” RSC Advances 11, no. 48 (2021): 30283–94. https://doi.org/10.1039/D1RA05961K.
35
+ 1. Fuchs, Till, Boris Mogwitz, Svenja‐Katharina Otto, Stefano Passerini, Felix H. Richter, and Jürgen Janek. “Working Principle of an Ionic Liquid Interlayer During Pressureless Lithium Stripping on Li 6.25 Al 0.25 La 3 Zr 2 O 12 (LLZO) Garnet‐Type Solid Electrolyte.” Batteries & Supercaps 4, no. 7 (July 2021): 1145–55. https://doi.org/10.1002/batt.202100015.
36
+ 1. Garabedian, Nikolay T., Paul J. Schreiber, Nico Brandt, Philipp Zschumme, Ines L. Blatter, Antje Dollmann, Christian Haug, et al. “Generating FAIR Research Data in Experimental Tribology.” Scientific Data 9, no. 1 (June 16, 2022): 315. https://doi.org/10.1038/s41597-022-01429-9.
37
+ 1. Gautam, Ajay, Marcel Sadowski, Michael Ghidiu, Nicolò Minafra, Anatoliy Senyshyn, Karsten Albe, and Wolfgang G. Zeier. “Engineering the Site‐Disorder and Lithium Distribution in the Lithium Superionic Argyrodite Li 6 PS 5 Br.” Advanced Energy Materials 11, no. 5 (February 2021): 2003369. https://doi.org/10.1002/aenm.202003369.
38
+ 1. Ghidiu, Michael, Roman Schlem, and Wolfgang G. Zeier. “Pyridine Complexes as Tailored Precursors for Rapid Synthesis of Thiophosphate Superionic Conductors.” Batteries & Supercaps 4, no. 4 (April 2021): 607–11. https://doi.org/10.1002/batt.202000317.
39
+ 1. Griem, Lars, Philipp Zschumme, Matthieu Laqua, Nico Brandt, Ephraim Schoof, Patrick Altschuh, and Michael Selzer. “KadiStudio: FAIR Modelling of Scientific Research Processes.” Data Science Journal 21 (September 23, 2022): 16. https://doi.org/10.5334/dsj-2022-016.
40
+ 1. Haffner, Arthur, Anna‐Katharina Hatz, Constantin Hoch, Bettina V. Lotsch, and Dirk Johrendt. “Synthesis and Structure of the Sodium Phosphidosilicate Na 2 SiP 2.” European Journal of Inorganic Chemistry 2020, no. 7 (February 21, 2020): 617–21. https://doi.org/10.1002/ejic.201901083.
41
+ 1. Haffner, Arthur, Anna‐Katharina Hatz, Otto E. O. Zeman, Constantin Hoch, Bettina V. Lotsch, and Dirk Johrendt. “Polymorphism and Fast Potassium‐Ion Conduction in the T5 Supertetrahedral Phosphidosilicate KSi 2 P 3.” Angewandte Chemie International Edition 60, no. 24 (June 7, 2021): 13641–46. https://doi.org/10.1002/anie.202101187.
42
+ 1. Harm, Sascha, Anna-Katharina Hatz, Igor Moudrakovski, Roland Eger, Alexander Kuhn, Constantin Hoch, and Bettina V. Lotsch. “Lesson Learned from NMR: Characterization and Ionic Conductivity of LGPS-like Li 7 SiPS 8.” Chemistry of Materials 31, no. 4 (February 26, 2019): 1280–88. https://doi.org/10.1021/acs.chemmater.8b04051.
43
+ 1. Harm, Sascha, Anna-Katharina Hatz, Christian Schneider, Carla Hoefer, Constantin Hoch, and Bettina V. Lotsch. “Finding the Right Blend: Interplay Between Structure and Sodium Ion Conductivity in the System Na5AlS4–Na4SiS4.” Frontiers in Chemistry 8 (February 18, 2020): 90. https://doi.org/10.3389/fchem.2020.00090.
44
+ 1. Hatz, Anna-Katharina, Igor Moudrakovski, Sebastian Bette, Maxwell W. Terban, Martin Etter, Markus Joos, Nella M. Vargas-Barbosa, Robert E. Dinnebier, and Bettina V. Lotsch. “Fast Water-Assisted Lithium Ion Conduction in Restacked Lithium Tin Sulfide Nanosheets.” Chemistry of Materials 33, no. 18 (September 28, 2021): 7337–49. https://doi.org/10.1021/acs.chemmater.1c01755.
45
+ 1. Helm, Bianca, Nicolò Minafra, Björn Wankmiller, Matthias T. Agne, Cheng Li, Anatoliy Senyshyn, Michael Ryan Hansen, and Wolfgang G. Zeier. “Correlating Structural Disorder to Li + Ion Transport in Li 4– x Ge 1– x Sb x S 4 (0 ≤ x ≤ 0.2).” Chemistry of Materials 34, no. 12 (June 28, 2022): 5558–70. https://doi.org/10.1021/acs.chemmater.2c00608.
46
+ 1. Hertle, Jonas, Felix Walther, Boris Mogwitz, Steffen Schröder, Xiaohan Wu, Felix H. Richter, and Jürgen Janek. “Miniaturization of Reference Electrodes for Solid-State Lithium-Ion Batteries.” Journal of The Electrochemical Society 170, no. 4 (April 1, 2023): 040519. https://doi.org/10.1149/1945-7111/accb6f.
47
+ 1. Heubner, Christian, Sebastian Maletti, Henry Auer, Juliane Hüttl, Karsten Voigt, Oliver Lohrberg, Kristian Nikolowski, Mareike Partsch, and Alexander Michaelis. “From Lithium‐Metal toward Anode‐Free Solid‐State Batteries: Current Developments, Issues, and Challenges.” Advanced Functional Materials 31, no. 51 (December 2021): 2106608. https://doi.org/10.1002/adfm.202106608.
48
+ 1. Hofer, Moritz, Michael Grube, Christine Friederike Burmeister, Peter Michalowski, Sabrina Zellmer, and Arno Kwade. “Effective Mechanochemical Synthesis of Sulfide Solid Electrolyte Li3PS4 in a High Energy Ball Mill by Process Investigation.” Advanced Powder Technology 34, no. 6 (June 2023): 104004. https://doi.org/10.1016/j.apt.2023.104004.
49
+ 1. Homann, Gerrit, Lukas Stolz, Jijeesh Nair, Isidora Cekic Laskovic, Martin Winter, and Johannes Kasnatscheew. “Poly(Ethylene Oxide)-Based Electrolyte for Solid-State-Lithium-Batteries with High Voltage Positive Electrodes: Evaluating the Role of Electrolyte Oxidation in Rapid Cell Failure.” Scientific Reports 10, no. 1 (March 9, 2020): 4390. https://doi.org/10.1038/s41598-020-61373-9.
50
+ 1. Homann, Gerrit, Lukas Stolz, Kerstin Neuhaus, Martin Winter, and Johannes Kasnatscheew. “Effective Optimization of High Voltage Solid‐State Lithium Batteries by Using Poly(Ethylene Oxide)‐Based Polymer Electrolyte with Semi‐Interpenetrating Network.” Advanced Functional Materials 30, no. 46 (November 2020): 2006289. https://doi.org/10.1002/adfm.202006289.
51
+ 1. Homann, Gerrit, Lukas Stolz, Martin Winter, and Johannes Kasnatscheew. “Elimination of ‘Voltage Noise’ of Poly (Ethylene Oxide)-Based Solid Electrolytes in High-Voltage Lithium Batteries: Linear versus Network Polymers.” iScience 23, no. 6 (June 2020): 101225. https://doi.org/10.1016/j.isci.2020.101225.
52
+ 1. Huo, Hanyu, Jürgen Janek, and -. “Solid-State Batteries: From ‘All-Solid’ to ‘Almost-Solid.’” National Science Review 10, no. 6 (May 10, 2023): nwad098. https://doi.org/10.1093/nsr/nwad098.
53
+ 1. Huo, Hanyu, Ming Jiang, Boris Mogwitz, Joachim Sann, Yuriy Yusim, Tong‐Tong Zuo, Yannik Moryson, et al. “Interface Design Enabling Stable Polymer/Thiophosphate Electrolyte Separators for Dendrite‐Free Lithium Metal Batteries.” Angewandte Chemie International Edition 62, no. 14 (March 27, 2023): e202218044. https://doi.org/10.1002/anie.202218044.
54
+ 1. Ingber, Tjark T. K., Dominik Liebenau, Myra Biedermann, Martin Kolek, Diddo Diddens, Hans-Dieter Wiemhöfer, Andreas Heuer, Martin Winter, and Peter Bieker. “Increasing the Lithium Ion Mobility in Poly(Phosphazene)-Based Solid Polymer Electrolytes through Tailored Cation Doping.” Journal of The Electrochemical Society 168, no. 7 (July 1, 2021): 070559. https://doi.org/10.1149/1945-7111/ac148d.
55
+ 1. Joos, Markus, Christian Schneider, Andreas Münchinger, Igor Moudrakovski, Robert Usiskin, Joachim Maier, and Bettina V. Lotsch. “Impact of Hydration on Ion Transport in Li 2 Sn 2 S 5 · x H 2 O.” Journal of Materials Chemistry A 9, no. 30 (2021): 16532–44. https://doi.org/10.1039/D1TA04736A.
56
+ 1. Khudyshkina, Anna D., Andreas J. Butzelaar, Yiran Guo, Maxi Hoffmann, Thomas Bergfeldt, Mareen Schaller, Sylvio Indris, Manfred Wilhelm, Patrick Théato, and Fabian Jeschull. “From Lithium to Potassium: Comparison of Cations in Poly(Ethylene Oxide)-Based Block Copolymer Electrolytes for Solid-State Alkali Metal Batteries.” Electrochimica Acta 454 (June 2023): 142421. https://doi.org/10.1016/j.electacta.2023.142421.
57
+ 1. Khudyshkina, Anna D., Polina A. Morozova, Andreas J. Butzelaar, Maxi Hoffmann, Manfred Wilhelm, Patrick Theato, Stanislav S. Fedotov, and Fabian Jeschull. “Poly(Ethylene Oxide)-Based Electrolytes for Solid-State Potassium Metal Batteries with a Prussian Blue Positive Electrode.” ACS Applied Polymer Materials 4, no. 4 (April 8, 2022): 2734–46. https://doi.org/10.1021/acsapm.2c00014.
58
+ 1. Kinzer, Bryan, Andrew L. Davis, Thorben Krauskopf, Hannah Hartmann, William S. LePage, Eric Kazyak, Jürgen Janek, Neil P. Dasgupta, and Jeff Sakamoto. “Operando Analysis of the Molten Li|LLZO Interface: Understanding How the Physical Properties of Li Affect the Critical Current Density.” Matter 4, no. 6 (June 2021): 1947–61. https://doi.org/10.1016/j.matt.2021.04.016.
59
+ 1. Koeppe, Arnd, Franz Bamer, Michael Selzer, Britta Nestler, and Bernd Markert. “Explainable Artificial Intelligence for Mechanics: Physics-Explaining Neural Networks for Constitutive Models.” Frontiers in Materials 8 (February 2, 2022): 824958. https://doi.org/10.3389/fmats.2021.824958.
60
+ 1. Koeppe, Arnd, Franz Bamer, Michael Selzer, Britta Nestler, and Bernd Markert. “Workflow Concepts to Model Nonlinear Mechanics with Computational Intelligence.” PAMM 21, no. 1 (December 2021): e202100238. https://doi.org/10.1002/pamm.202100238.
61
+ 1. Krause, Daniel T., Susanna Krämer, Vassilios Siozios, Andreas J. Butzelaar, Martin Dulle, Beate Förster, Patrick Theato, et al. “Improved Route to Linear Triblock Copolymers by Coupling with Glycidyl Ether-Activated Poly(Ethylene Oxide) Chains.” Polymers 15, no. 9 (April 29, 2023): 2128. https://doi.org/10.3390/polym15092128.
62
+ 1. Kurzhals, Philipp, Felix Riewald, Matteo Bianchini, Shamail Ahmed, Andreas Michael Kern, Felix Walther, Heino Sommer, Kerstin Volz, and Jürgen Janek. “Deeper Understanding of the Lithiation Reaction during the Synthesis of LiNiO 2 Towards an Increased Production Throughput.” Journal of The Electrochemical Society 169, no. 5 (May 1, 2022): 050526. https://doi.org/10.1149/1945-7111/ac6c0b.
63
+ 1. Liang, Hai‐Peng, Zhen Chen, Xu Dong, Tatiana Zinkevich, Sylvio Indris, Stefano Passerini, and Dominic Bresser. “Photo‐Cross‐Linked Single‐Ion Conducting Polymer Electrolyte for Lithium‐Metal Batteries.” Macromolecular Rapid Communications 43, no. 12 (June 2022): 2100820. https://doi.org/10.1002/marc.202100820.
64
+ 1. Liang, Hai‐Peng, Maider Zarrabeitia, Zhen Chen, Sven Jovanovic, Steffen Merz, Josef Granwehr, Stefano Passerini, and Dominic Bresser. “Polysiloxane‐Based Single‐Ion Conducting Polymer Blend Electrolyte Comprising Small‐Molecule Organic Carbonates for High‐Energy and High‐Power Lithium‐Metal Batteries.” Advanced Energy Materials 12, no. 16 (April 2022): 2200013. https://doi.org/10.1002/aenm.202200013.
65
+ 1. Linz, Mario, Florian Bühner, Daniel Paulus, Lukas Hennerici, Yiran Guo, Valeriu Mereacre, Ulrich Mansfeld, Martin Seipenbusch, Jaroslaw Kita, and Ralf Moos. “Revealing the Deposition Mechanism of the Powder Aerosol Deposition Method Using Ceramic Oxide Core–Shell Particles.” Advanced Materials 36, no. 7 (February 2024): 2308294. https://doi.org/10.1002/adma.202308294.
66
+ 1. Lobe, Sandra, Alexander Bauer, Doris Sebold, Nadine Wettengl, Dina Fattakhova-Rohlfing, and Sven Uhlenbruck. “Sintering of Li-Garnets: Impact of Al-Incorporation and Powder-Bed Composition on Microstructure and Ionic Conductivity.” Open Ceramics 10 (June 2022): 100268. https://doi.org/10.1016/j.oceram.2022.100268.
67
+ 1. Lobe, Sandra, Alexander Bauer, Sven Uhlenbruck, and Dina Fattakhova‐Rohlfing. “Physical Vapor Deposition in Solid‐State Battery Development: From Materials to Devices.” Advanced Science 8, no. 11 (June 2021): 2002044. https://doi.org/10.1002/advs.202002044.
68
+ 1. Lohrberg, Oliver, Karsten Voigt, Sebastian Maletti, Henry Auer, Kristian Nikolowski, Christian Heubner, and Alexander Michaelis. “Benchmarking and Critical Design Considerations of Zero‐Excess Li‐Metal Batteries.” Advanced Functional Materials 33, no. 24 (June 2023): 2214891. https://doi.org/10.1002/adfm.202214891.
69
+ 1. Lombardo, Teo, Christine Kern, Joachim Sann, Marcus Rohnke, and Jürgen Janek. “Bridging the Gap: Electrode Microstructure and Interphase Characterization by Combining ToF‐SIMS and Machine Learning.” Advanced Materials Interfaces 10, no. 36 (December 2023): 2300640. https://doi.org/10.1002/admi.202300640.
70
+ 1. Loutati, A., Y. J. Sohn, and F. Tietz. “Phase‐field Determination of NaSICON Materials in the Quaternary System Na 2 O−P 2 O 5 −SiO 2 −ZrO 2 : The Series Na 3 Zr 3–x Si 2 P x O 11.5+x/2.” ChemPhysChem 22, no. 10 (May 17, 2021): 995–1007. https://doi.org/10.1002/cphc.202100032.
71
+ 1. Loutati, Asmaa, Olivier Guillon, Frank Tietz, and Dina Fattakhova-Rohlfing. “NaSICON-Type Solid-State Li+ Ion Conductors with Partial Polyanionic Substitution of Phosphate with Silicate.” Open Ceramics 12 (December 2022): 100313. https://doi.org/10.1016/j.oceram.2022.100313.
72
+ 1. Loutati, Asmaa, Philipp Odenwald, Burak Aktekin, Joachim Sann, Olivier Guillon, Frank Tietz, and Dina Fattakhova‐Rohlfing. “Survey of Zirconium‐Containing NaSICON‐type Solid‐State Li + Ion Conductors with the Aim of Increasing Reduction Stability by Partial Cation Substitution.” Batteries & Supercaps 5, no. 11 (November 2022): e202200327. https://doi.org/10.1002/batt.202200327.
73
+ 1. Ma, Qianli, Till Ortmann, Aikai Yang, Doris Sebold, Simon Burkhardt, Marcus Rohnke, Frank Tietz, Dina Fattakhova‐Rohlfing, Jürgen Janek, and Olivier Guillon. “Enhancing the Dendrite Tolerance of NaSICON Electrolytes by Suppressing Edge Growth of Na Electrode along Ceramic Surface.” Advanced Energy Materials 12, no. 40 (October 2022): 2201680. https://doi.org/10.1002/aenm.202201680.
74
+ 1. Malaki, Michael, Johannes Haust, Jean Philippe Beaupain, Henry Auer, Andreas Beyer, Katja Wätzig, Mihails Kusnezoff, and Kerstin Volz. “Probing the Interface Evolution in Co‐sintered All‐Phosphate Cathode‐Solid Electrolyte Composites.” Advanced Materials Interfaces 10, no. 35 (December 2023): 2300513. https://doi.org/10.1002/admi.202300513.
75
+ 1. Mann, Markus, Michael Küpers, Grit Häuschen, Martin Finsterbusch, Dina Fattakhova-Rohlfing, and Olivier Guillon. “Evaluation of Scalable Synthesis Methods for Aluminum-Substituted Li7La3Zr2O12 Solid Electrolytes.” Materials 14, no. 22 (November 11, 2021): 6809. https://doi.org/10.3390/ma14226809.
76
+ 1. Mann, Markus, Michael Küpers, Grit Häuschen, Martin Finsterbusch, Dina Fattakhova-Rohlfing, and Olivier Guillon. “The Influence of Hafnium Impurities on the Electrochemical Performance of Tantalum Substituted Li7La3Zr2O12 Solid Electrolytes.” Ionics 28, no. 1 (January 2022): 53–62. https://doi.org/10.1007/s11581-021-04300-w.
77
+ 1. Mann, Markus, Christian Schwab, Martin Ihrig, Martin Finsterbusch, Manfred Martin, Olivier Guillon, and Dina Fattakhova-Rohlfing. “Anhydrous LiNbO 3 Synthesis and Its Application for Surface Modification of Garnet Type Li-Ion Conductors.” Journal of The Electrochemical Society 169, no. 4 (April 1, 2022): 040564. https://doi.org/10.1149/1945-7111/ac6836.
78
+ 1. Mayer, Alexander, Tugce Ates, Alberto Varzi, Stefano Passerini, and Dominic Bresser. “Novel Sulfur-Doped Single-Ion Conducting Multi-Block Copolymer Electrolyte.” Frontiers in Chemistry 10 (August 23, 2022): 974202. https://doi.org/10.3389/fchem.2022.974202.
79
+ 1. Mereacre, Valeriu, Pirmin Stüble, Vanessa Trouillet, Shamail Ahmed, Kerstin Volz, and Joachim R. Binder. “Coating versus Doping: Understanding the Enhanced Performance of High‐Voltage Batteries by the Coating of Spinel LiNi 0.5 Mn 1.5 O 4 with Li 0.35 La 0.55 TiO 3.” Advanced Materials Interfaces 10, no. 2 (January 2023): 2201324. https://doi.org/10.1002/admi.202201324.
80
+ 1. Merz, Steffen, Jie Wang, Petrik Galvosas, and Josef Granwehr. “MAS-NMR of [Pyr13][Tf2N] and [Pyr16][Tf2N] Ionic Liquids Confined to Carbon Black: Insights and Pitfalls.” Molecules 26, no. 21 (November 5, 2021): 6690. https://doi.org/10.3390/molecules26216690.
81
+ 1. Minnmann, Philip, Lars Quillman, Simon Burkhardt, Felix H. Richter, and Jürgen Janek. “Editors’ Choice—Quantifying the Impact of Charge Transport Bottlenecks in Composite Cathodes of All-Solid-State Batteries.” Journal of The Electrochemical Society 168, no. 4 (April 1, 2021): 040537. https://doi.org/10.1149/1945-7111/abf8d7.
82
+ 1. Minnmann, Philip, Florian Strauss, Anja Bielefeld, Raffael Ruess, Philipp Adelhelm, Simon Burkhardt, Sören L. Dreyer, et al. “Designing Cathodes and Cathode Active Materials for Solid‐State Batteries.” Advanced Energy Materials 12, no. 35 (September 2022): 2201425. https://doi.org/10.1002/aenm.202201425.
83
+ 1. Molaiyan, Palanivel, Sarah E. Mailhiot, Kevin Voges, Anu M. Kantola, Tao Hu, Peter Michalowski, Arno Kwade, Ville-Veikko Telkki, and Ulla Lassi. “Investigation of the Structure and Ionic Conductivity of a Li3InCl6 Modified by Dry Room Annealing for Solid-State Li-Ion Battery Applications.” Materials & Design 227 (March 2023): 111690. https://doi.org/10.1016/j.matdes.2023.111690.
84
+ 1. Möller, Sören, Takahiro Satoh, Yasuyuki Ishii, Britta Teßmer, Rayan Guerdelli, Tomihiro Kamiya, Kazuhisa Fujita, et al. “Absolute Local Quantification of Li as Function of State-of-Charge in All-Solid-State Li Batteries via 2D MeV Ion-Beam Analysis.” Batteries 7, no. 2 (June 20, 2021): 41. https://doi.org/10.3390/batteries7020041.
85
+ 1. Mücke, Robert, Najma Yaqoob, Martin Finsterbusch, Fadi Al-Jaljouli, Payam Kaghazchi, Dina Fattakhova-Rohlfing, and Olivier Guillon. “Modelling Electro-Chemically Induced Stresses in All-Solid-State Batteries: Screening Electrolyte and Cathode Materials in Composite Cathodes.” Journal of Materials Chemistry A 11, no. 35 (2023): 18801–10. https://doi.org/10.1039/D3TA01729J.
86
+ 1. Nair, Jijeesh Ravi, Laura Imholt, Gunther Brunklaus, and Martin Winter. “Lithium Metal Polymer Electrolyte Batteries: Opportunities and Challenges.” The Electrochemical Society Interface 28, no. 2 (2019): 55–61. https://doi.org/10.1149/2.F05192if.
87
+ 1. Negi, Rajendra S., Yuriy Yusim, Ruijun Pan, Shamail Ahmed, Kerstin Volz, Ryo Takata, Franz Schmidt, Anja Henss, and Matthias T. Elm. “A Dry‐Processed Al 2 O 3 /LiAlO 2 Coating for Stabilizing the Cathode/Electrolyte Interface in High‐Ni NCM‐Based All‐Solid‐State Batteries.” Advanced Materials Interfaces 9, no. 8 (March 2022): 2101428. https://doi.org/10.1002/admi.202101428.
88
+ 1. Odenwald, Philipp, Qianli Ma, Bambar Davaasuren, Enkhtsetseg Dashjav, Frank Tietz, Michael Wolff, Wolfgang Rheinheimer, Sven Uhlenbruck, Olivier Guillon, and Dina Fattakhova‐Rohlfing. “The Impact of Lithium Tungstate on the Densification and Conductivity of Phosphate Lithium‐Ion Conductors.” ChemElectroChem 9, no. 5 (March 11, 2022): e202101366. https://doi.org/10.1002/celc.202101366.
89
+ 1. Ohno, Saneyuki, Tim Bernges, Johannes Buchheim, Marc Duchardt, Anna-Katharina Hatz, Marvin A. Kraft, Hiram Kwak, et al. “How Certain Are the Reported Ionic Conductivities of Thiophosphate-Based Solid Electrolytes? An Interlaboratory Study.” ACS Energy Letters 5, no. 3 (March 13, 2020): 910–15. https://doi.org/10.1021/acsenergylett.9b02764.
90
+ 1. Ortmann, Till, Simon Burkhardt, Janis Kevin Eckhardt, Till Fuchs, Ziming Ding, Joachim Sann, Marcus Rohnke, et al. “Kinetics and Pore Formation of the Sodium Metal Anode on NASICON‐Type Na 3.4 Zr 2 Si 2.4 P 0.6 O 12 for Sodium Solid‐State Batteries.” Advanced Energy Materials 13, no. 5 (February 2023): 2202712. https://doi.org/10.1002/aenm.202202712.
91
+ 1. Otto, Svenja‐K., Luise M. Riegger, Till Fuchs, Sven Kayser, Pascal Schweitzer, Simon Burkhardt, Anja Henss, and Jürgen Janek. “In Situ Investigation of Lithium Metal–Solid Electrolyte Anode Interfaces with ToF‐SIMS.” Advanced Materials Interfaces 9, no. 13 (May 2022): 2102387. https://doi.org/10.1002/admi.202102387.
92
+ 1. Pervez, Syed Atif, Guktae Kim, Bhaghavathi P. Vinayan, Musa A. Cambaz, Matthias Kuenzel, Maral Hekmatfar, Maximilian Fichtner, and Stefano Passerini. “Overcoming the Interfacial Limitations Imposed by the Solid–Solid Interface in Solid‐State Batteries Using Ionic Liquid‐Based Interlayers.” Small 16, no. 14 (April 2020): 2000279. https://doi.org/10.1002/smll.202000279.
93
+ 1. Plass, Maximilian A., Sebastian Bette, Nina Philipp, Igor Moundrakovski, Kathrin Küster, Robert E. Dinnebier, and Bettina V. Lotsch. “Influence of Synthesis and Substitution on the Structure and Ionic Transport Properties of Lithium Rare Earth Metal Halides.” Journal of Materials Chemistry A 11, no. 24 (2023): 13027–38. https://doi.org/10.1039/D3TA01327H.
94
+ 1. Plass, Maximilian A., Maxwell W. Terban, Tanja Scholz, Igor Moudrakovski, Viola Duppel, Robert E. Dinnebier, and Bettina V. Lotsch. “Structure and Ionic Conductivity of Li-Disordered Bismuth o -Thiophosphate Li 60–3 x Bi 16+ x (PS 4 ) 36.” Inorganic Chemistry 62, no. 27 (July 10, 2023): 10655–64. https://doi.org/10.1021/acs.inorgchem.3c01028.
95
+ 1. Pokle, Anuj, Daniel Weber, Matteo Bianchini, Jürgen Janek, and Kerstin Volz. “Probing the Ni(OH) 2 Precursor for LiNiO 2 at the Atomic Scale: Insights into the Origin of Structural Defect in a Layered Cathode Active Material.” Small 19, no. 4 (January 2023): 2205508. https://doi.org/10.1002/smll.202205508.
96
+ 1. Rajagopal, Deepalaxmi, Arnd Koeppe, Meysam Esmaeilpour, Michael Selzer, Wolfgang Wenzel, Helge Stein, and Britta Nestler. “Data‐Driven Virtual Material Analysis and Synthesis for Solid Electrolyte Interphases.” Advanced Energy Materials 13, no. 40 (October 2023): 2301985. https://doi.org/10.1002/aenm.202301985.
97
+ 1. Riegger, Luise M., Roman Schlem, Joachim Sann, Wolfgang G. Zeier, and Jürgen Janek. “Lithium‐Metal Anode Instability of the Superionic Halide Solid Electrolytes and the Implications for Solid‐State Batteries.” Angewandte Chemie International Edition 60, no. 12 (March 15, 2021): 6718–23. https://doi.org/10.1002/anie.202015238.
98
+ 1. Rosen, Melanie, Martin Finsterbusch, Olivier Guillon, and Dina Fattakhova-Rohlfing. “Free Standing Dual Phase Cathode Tapes – Scalable Fabrication and Microstructure Optimization of Garnet-Based Ceramic Cathodes.” Journal of Materials Chemistry A 10, no. 5 (2022): 2320–26. https://doi.org/10.1039/D1TA07194G.
99
+ 1. Rosen, Melanie, Ruijie Ye, Markus Mann, Sandra Lobe, Martin Finsterbusch, Olivier Guillon, and Dina Fattakhova-Rohlfing. “Controlling the Lithium Proton Exchange of LLZO to Enable Reproducible Processing and Performance Optimization.” Journal of Materials Chemistry A 9, no. 8 (2021): 4831–40. https://doi.org/10.1039/D0TA11096E.
100
+ 1. Rosenbach, Carolin, Felix Walther, Justine Ruhl, Matthias Hartmann, Theodoor Anton Hendriks, Saneyuki Ohno, Jürgen Janek, and Wolfgang G. Zeier. “Visualizing the Chemical Incompatibility of Halide and Sulfide‐Based Electrolytes in Solid‐State Batteries.” Advanced Energy Materials 13, no. 6 (February 2023): 2203673. https://doi.org/10.1002/aenm.202203673.
101
+ 1. Ruess, Raffael, Davide Gomboso, Mark A. Ulherr, Enrico Trevisanello, Yuan Ma, Aleksandr Kondrakov, Torsten Brezesinski, and Jürgen Janek. “Single-Crystalline LiNiO 2 as High-Capacity Cathode Active Material for Solid-State Lithium-Ion Batteries.” Journal of The Electrochemical Society, February 15, 2023. https://doi.org/10.1149/1945-7111/acbc4f.
102
+ 1. Ruess, Raffael, Mark A. Ulherr, Enrico Trevisanello, Steffen Schröder, Anja Henss, and Jürgen Janek. “Transition Metal Oxides and Li 2 CO 3 as Precursors for the Synthesis of Ni-Rich Single-Crystalline NCM for Sustainable Lithium-Ion Battery Production.” Journal of The Electrochemical Society 169, no. 7 (July 1, 2022): 070531. https://doi.org/10.1149/1945-7111/ac8242.
103
+ 1. Ruhl, Justine, Luise M. Riegger, Michael Ghidiu, and Wolfgang G. Zeier. “Impact of Solvent Treatment of the Superionic Argyrodite Li 6 PS 5 Cl on Solid‐State Battery Performance.” Advanced Energy and Sustainability Research 2, no. 2 (February 2021): 2000077. https://doi.org/10.1002/aesr.202000077.
104
+ 1. Scheld, Walter Sebastian, Kwangnam Kim, Christian Schwab, Alexandra C. Moy, Shi‐Kai Jiang, Markus Mann, Christian Dellen, et al. “The Riddle of Dark LLZO: Cobalt Diffusion in Garnet Separators of Solid‐State Lithium Batteries.” Advanced Functional Materials 33, no. 43 (October 2023): 2302939. https://doi.org/10.1002/adfm.202302939.
105
+ 1. Schiffmann, Nikolas, Ethel C. Bucharsky, Karl G. Schell, Charlotte A. Fritsch, Michael Knapp, and Michael J. Hoffmann. “Upscaling of LATP Synthesis: Stoichiometric Screening of Phase Purity and Microstructure to Ionic Conductivity Maps.” Ionics 27, no. 5 (May 2021): 2017–25. https://doi.org/10.1007/s11581-021-03961-x.
106
+ 1. Schlautmann, Eva, Alexander Weiß, Oliver Maus, Lukas Ketter, Moumita Rana, Sebastian Puls, Vera Nickel, et al. “Impact of the Solid Electrolyte Particle Size Distribution in Sulfide‐Based Solid‐State Battery Composites.” Advanced Energy Materials 13, no. 41 (November 2023): 2302309. https://doi.org/10.1002/aenm.202302309.
107
+ 1. Schlem, Roman, Christine Friederike Burmeister, Peter Michalowski, Saneyuki Ohno, Georg F. Dewald, Arno Kwade, and Wolfgang G. Zeier. “Energy Storage Materials for Solid‐State Batteries: Design by Mechanochemistry.” Advanced Energy Materials 11, no. 30 (August 2021): 2101022. https://doi.org/10.1002/aenm.202101022.
108
+ 1. Schmaltz, Thomas, Felix Hartmann, Tim Wicke, Lukas Weymann, Christoph Neef, and Jürgen Janek. “A Roadmap for Solid‐State Batteries.” Advanced Energy Materials 13, no. 43 (November 2023): 2301886. https://doi.org/10.1002/aenm.202301886.
109
+ 1. Schmieg, Barbara, Nico Brandt, Vera J. Schnepp, Luka Radosevic, Sarah Gretzinger, Michael Selzer, and Jürgen Hubbuch. “Structured Data Storage for Data-Driven Process Optimisation in Bioprinting.” Applied Sciences 12, no. 15 (August 1, 2022): 7728. https://doi.org/10.3390/app12157728.
110
+ 1. Schneider, Christian, Christoph P Schmidt, Anton Neumann, Moritz Clausnitzer, Marcel Sadowski, Sascha Harm, Christoph Meier, et al. “Effect of Particle Size and Pressure on the Transport Properties of the Fast Ion Conductor t‐Li7SiPS8.” Adv. Energy Mater., 2023.
111
+ 1. Schneider, Kirstin, Vivien Kiyek, Martin Finsterbusch, Bengi Yagmurlu, and Daniel Goldmann. “Acid Leaching of Al- and Ta-Substituted Li7La3Zr2O12 (LLZO) Solid Electrolyte.” Metals 13, no. 5 (April 24, 2023): 834. https://doi.org/10.3390/met13050834.
112
+ 1. Schneider, Stefanie, Lucas G. Balzat, Bettina V. Lotsch, and Wolfgang Schnick. “Structure Determination of the Crystalline LiPON Model Structure Li 5+ x P 2 O 6− x N 1+ x with x ≈0.9.” Chemistry – A European Journal 29, no. 9 (February 10, 2023): e202202984. https://doi.org/10.1002/chem.202202984.
113
+ 1. Schneider, Stefanie, Sandra T. Kreiner, Lucas G. Balzat, Bettina V. Lotsch, and Wolfgang Schnick. “Finding Order in Disorder: The Highly Disordered Lithium Oxonitridophosphate Double Salt Li 8+ x P 3 O 10− x N 1+ x ( x =1.4(5)).” Chemistry – A European Journal 29, no. 55 (October 2, 2023): e202301986. https://doi.org/10.1002/chem.202301986.
114
+ 1. Schneider, Stefanie, Eva‐Maria Wendinger, Volodymyr Baran, Anna‐Katharina Hatz, Bettina V. Lotsch, Markus Nentwig, Oliver Oeckler, Thomas Bräuniger, and Wolfgang Schnick. “Comprehensive Investigation of Anion Species in Crystalline Li + Ion Conductor Li 27− x [P 4 O 7+ x N 9− x ]O 3 ( x ≈1.9(3)).” Chemistry – A European Journal 29, no. 27 (May 11, 2023): e202300174. https://doi.org/10.1002/chem.202300174.
115
+ 1. Scholz, Tanja, Christian Schneider, Roland Eger, Viola Duppel, Igor Moudrakovski, Armin Schulz, Jürgen Nuss, and Bettina V. Lotsch. “Phase Formation through Synthetic Control: Polymorphism in the Sodium-Ion Solid Electrolyte Na 4 P 2 S 6.” Journal of Materials Chemistry A 9, no. 13 (2021): 8692–8703. https://doi.org/10.1039/D0TA11008F.
116
+ 1. Scholz, Tanja, Christian Schneider, Maxwell W. Terban, Zeyu Deng, Roland Eger, Martin Etter, Robert E. Dinnebier, Pieremanuele Canepa, and Bettina V. Lotsch. “Order-Disorder Transition Driven Superionic Conduction in the New Plastic Polymorph of Na4P2S6.” Preprint. Chemistry, December 21, 2021. https://doi.org/10.26434/chemrxiv-2021-7r31q.
117
+ 1. Scholz, Tanja, Christian Schneider, Maxwell W. Terban, Zeyu Deng, Roland Eger, Martin Etter, Robert E. Dinnebier, Pieremanuele Canepa, and Bettina V. Lotsch. “Superionic Conduction in the Plastic Crystal Polymorph of Na 4 P 2 S 6.” ACS Energy Letters 7, no. 4 (April 8, 2022): 1403–11. https://doi.org/10.1021/acsenergylett.1c02815.
118
+ 1. Schreiber, Andrea, Melanie Rosen, Katja Waetzig, Kristian Nikolowski, Nikolas Schiffmann, Hartmut Wiggers, Michael Küpers, et al. “Oxide Ceramic Electrolytes for All-Solid-State Lithium Batteries – Cost-Cutting Cell Design and Environmental Impact.” Green Chemistry 25, no. 1 (2023): 399–414. https://doi.org/10.1039/D2GC03368B.
119
+ 1. Schwab, Christian, Grit Häuschen, Markus Mann, Christoph Roitzheim, Olivier Guillon, Dina Fattakhova-Rohlfing, and Martin Finsterbusch. “Towards Economic Processing of High Performance Garnets – Case Study on Zero Li Excess Ga-Substituted LLZO.” Journal of Materials Chemistry A 11, no. 11 (2023): 5670–80. https://doi.org/10.1039/D2TA09250F.
120
+ 1. Schwich, Lilian, Michael Küpers, Martin Finsterbusch, Andrea Schreiber, Dina Fattakhova-Rohlfing, Olivier Guillon, and Bernd Friedrich. “Recycling Strategies for Ceramic All-Solid-State Batteries—Part I: Study on Possible Treatments in Contrast to Li-Ion Battery Recycling.” Metals 10, no. 11 (November 17, 2020): 1523. https://doi.org/10.3390/met10111523.
121
+ 1. Sen, Sudeshna, Felix H. Richter, and -. “Typology of Battery Cells – From Liquid to Solid Electrolytes.” Advanced Science 10, no. 33 (November 2023): 2303985. https://doi.org/10.1002/advs.202303985.
122
+ 1. Shi, Bing‐Xuan, Yuriy Yusim, Sudeshna Sen, Thomas Demuth, Raffael Ruess, Kerstin Volz, Anja Henss, and Felix H. Richter. “Mitigating Contact Loss in Li 6 PS 5 Cl‐Based Solid‐State Batteries Using a Thin Cationic Polymer Coating on NCM.” Advanced Energy Materials 13, no. 24 (June 2023): 2300310. https://doi.org/10.1002/aenm.202300310.
123
+ 1. Shi, Junli, Huu-Dat Nguyen, Zhen Chen, Rui Wang, Dominik Steinle, Lester Barnsley, Jie Li, et al. “Nanostructured Block Copolymer Single-Ion Conductors for Low-Temperature, High-Voltage and Fast Charging Lithium-Metal Batteries.” Energy Materials 3, no. 4 (July 21, 2023). https://doi.org/10.20517/energymater.2023.27.
124
+ 1. Singh, Dheeraj Kumar, Till Fuchs, Christian Krempaszky, Boris Mogwitz, Simon Burkhardt, Felix H. Richter, and Jürgen Janek. “Overcoming Anode Instability in Solid‐State Batteries through Control of the Lithium Metal Microstructure.” Advanced Functional Materials 33, no. 1 (January 2023): 2211067. https://doi.org/10.1002/adfm.202211067.
125
+ 1. Singh, Dheeraj Kumar, Till Fuchs, Christian Krempaszky, Boris Mogwitz, and Jürgen Janek. “Non‐Linear Kinetics of The Lithium Metal Anode on Li 6 PS 5 Cl at High Current Density: Dendrite Growth and the Role of Lithium Microstructure on Creep.” Advanced Science 10, no. 22 (August 2023): 2302521. https://doi.org/10.1002/advs.202302521.
126
+ 1. Singh, Dheeraj Kumar, Anja Henss, Boris Mogwitz, Ajay Gautam, Jonas Horn, Thorben Krauskopf, Simon Burkhardt, Joachim Sann, Felix H. Richter, and Jürgen Janek. “Li6PS5Cl Microstructure and Influence on Dendrite Growth in Solid-State Batteries with Lithium Metal Anode.” Cell Reports Physical Science 3, no. 9 (September 2022): 101043. https://doi.org/10.1016/j.xcrp.2022.101043.
127
+ 1. Sinzig, Stephan, Thomas Hollweck, Christoph P. Schmidt, and Wolfgang A. Wall. “A Finite Element Formulation to Three-Dimensionally Resolve Space-Charge Layers in Solid Electrolytes.” Journal of The Electrochemical Society 170, no. 4 (April 1, 2023): 040513. https://doi.org/10.1149/1945-7111/acc692.
128
+ 1. Sinzig, Stephan, Christoph P. Schmidt, and Wolfgang A. Wall. “An Efficient Approach to Include Transport Effects in Thin Coating Layers in Electrochemo-Mechanical Models for All-Solid-State Batteries.” Journal of The Electrochemical Society 170, no. 10 (October 1, 2023): 100532. https://doi.org/10.1149/1945-7111/ad0264.
129
+ 1. Steinle, Dominik, Zhen Chen, Huu-Dat Nguyen, Matthias Kuenzel, Cristina Iojoiu, Stefano Passerini, and Dominic Bresser. “Single-Ion Conducting Polymer Electrolyte for Li||LiNi0.6Mn0.2Co0.2O2 Batteries—Impact of the Anodic Cutoff Voltage and Ambient Temperature.” Journal of Solid State Electrochemistry 26, no. 1 (January 2022): 97–102. https://doi.org/10.1007/s10008-020-04895-6.
130
+ 1. Stolz, Lukas, Sebastian Hochstädt, Stephan Röser, Michael Ryan Hansen, Martin Winter, and Johannes Kasnatscheew. “Single-Ion versus Dual-Ion Conducting Electrolytes: The Relevance of Concentration Polarization in Solid-State Batteries.” ACS Appl. Mater. Interfaces, 2022.
131
+ 1. Stolz, Lukas, Gerrit Homann, Martin Winter, and Johannes Kasnatscheew. “Area Oversizing of Lithium Metal Electrodes in Solid‐State Batteries: Relevance for Overvoltage and Thus Performance?” ChemSusChem 14, no. 10 (May 20, 2021): 2163–69. https://doi.org/10.1002/cssc.202100213.
132
+ 1. Stolz, Lukas, Gerrit Homann, Martin Winter, and Johannes Kasnatscheew. “Kinetical Threshold Limits in Solid-State Lithium Batteries: Data on Practical Relevance of Sand Equation.” Data in Brief 34 (February 2021): 106688. https://doi.org/10.1016/j.dib.2020.106688.
133
+ 1. Stolz, Lukas, Gerrit Homann, Martin Winter, and Johannes Kasnatscheew. “Realizing Poly(Ethylene Oxide) as a Polymer for Solid Electrolytes in High Voltage Lithium Batteries via Simple Modification of the Cell Setup.” Materials Advances 2, no. 10 (2021): 3251–56. https://doi.org/10.1039/D1MA00009H.
134
+ 1. Stolz, Lukas, Gerrit Homann, Martin Winter, and Johannes Kasnatscheew. “The Sand Equation and Its Enormous Practical Relevance for Solid-State Lithium Metal Batteries.” Materials Today 44 (April 2021): 9–14. https://doi.org/10.1016/j.mattod.2020.11.025.
135
+ 1. Stolz, Lukas, Stephan Röser, Gerrit Homann, Martin Winter, and Johannes Kasnatscheew. “Pragmatic Approaches to Correlate between the Physicochemical Properties of a Linear Poly(Ethylene Oxide)-Based Solid Polymer Electrolyte and the Performance in a High-Voltage Li-Metal Battery.” The Journal of Physical Chemistry C 125, no. 33 (August 26, 2021): 18089–97. https://doi.org/10.1021/acs.jpcc.1c03614.
136
+ 1. Tian, Guiying, Zijian Zhao, Tatiana Zinkevich, Katharina Elies, Frieder Scheiba, and Helmut Ehrenberg. “A Crosslinked Polyethyleneglycol Solid Electrolyte Dissolving Lithium Bis(Trifluoromethylsulfonyl)Imide for Rechargeable Lithium Batteries.” ChemSusChem 12, no. 20 (October 21, 2019): 4708–18. https://doi.org/10.1002/cssc.201901587.
137
+ 1. Vijayakumar, Vidyanand, Bihag Anothumakkool, Sreekumar Kurungot, Martin Winter, and Jijeesh Ravi Nair. “In Situ Polymerization Process: An Essential Design Tool for Lithium Polymer Batteries.” Energy & Environmental Science 14, no. 5 (2021): 2708–88. https://doi.org/10.1039/D0EE03527K.
138
+ 1. Vijayakumar, Vidyanand, Meena Ghosh, Kiran Asokan, Santhosh Babu Sukumaran, Sreekumar Kurungot, Jonas Mindemark, Daniel Brandell, Martin Winter, and Jijeesh Ravi Nair. “2D Layered Nanomaterials as Fillers in Polymer Composite Electrolytes for Lithium Batteries.” Advanced Energy Materials 13, no. 15 (April 2023): 2203326. https://doi.org/10.1002/aenm.202203326.
139
+ 1. Vinnichenko, Mykola, Katja Waetzig, Alf Aurich, Christoph Baumgaertner, Mathias Herrmann, Chang Won Ho, Mihails Kusnezoff, and Chang Woo Lee. “Li-Ion Conductive Li1.3Al0.3Ti1.7(PO4)3 (LATP) Solid Electrolyte Prepared by Cold Sintering Process with Various Sintering Additives.” Nanomaterials 12, no. 18 (September 13, 2022): 3178. https://doi.org/10.3390/nano12183178.
140
+ 1. Waetzig, Katja, Christian Heubner, and Mihails Kusnezoff. “Reduced Sintering Temperatures of Li+ Conductive Li1.3Al0.3Ti1.7(PO4)3 Ceramics.” Crystals 10, no. 5 (May 20, 2020): 408. https://doi.org/10.3390/cryst10050408.
141
+ 1. Waidha, Aamir Iqbal, Amila Salihovic, Martine Jacob, Vanita Vanita, Burak Aktekin, Kristina Brix, Kerstin Wissel, et al. “Recycling of All‐Solid‐State Li‐ion Batteries: A Case Study of the Separation of Individual Components Within a System Composed of LTO, LLZTO and NMC**.” ChemSusChem 16, no. 13 (July 7, 2023): e202202361. https://doi.org/10.1002/cssc.202202361.
142
+ 1. Wandelt, Sophia L., Alexander Mutschke, Dmitry Khalyavin, Robert Calaminus, Jennifer Steinadler, Bettina V. Lotsch, and Wolfgang Schnick. “Combining Nitridoborates, Nitrides and Hydrides—Synthesis and Characterization of the Multianionic Sr 6 N[BN 2 ] 2 H 3.” Angewandte Chemie International Edition 62, no. 50 (December 11, 2023): e202313564. https://doi.org/10.1002/anie.202313564.
143
+ 1. Wang, Shuo, Mingxue Tang, Qinghua Zhang, Baohua Li, Saneyuki Ohno, Felix Walther, Ruijun Pan, et al. “Lithium Argyrodite as Solid Electrolyte and Cathode Precursor for Solid‐State Batteries with Long Cycle Life.” Advanced Energy Materials 11, no. 31 (August 2021): 2101370. https://doi.org/10.1002/aenm.202101370.
144
+ 1. Wang, Shuo, Wenbo Zhang, Xiang Chen, Dyuman Das, Raffael Ruess, Ajay Gautam, Felix Walther, et al. “Influence of Crystallinity of Lithium Thiophosphate Solid Electrolytes on the Performance of Solid‐State Batteries.” Advanced Energy Materials 11, no. 24 (June 2021): 2100654. https://doi.org/10.1002/aenm.202100654.
145
+ 1. Wang, Shuo, Xue Zhang, Sijie Liu, Chengzhou Xin, Chuanjiao Xue, Felix Richter, Liangliang Li, et al. “High-Conductivity Free-Standing Li6PS5Cl/Poly(Vinylidene Difluoride) Composite Solid Electrolyte Membranes for Lithium-Ion Batteries.” Journal of Materiomics 6, no. 1 (March 2020): 70–76. https://doi.org/10.1016/j.jmat.2019.12.010.
146
+ 1. Wei, Zhixuan, Ruben Maile, Luise M. Riegger, Marcus Rohnke, Klaus Müller‐Buschbaum, and Jürgen Janek. “Ionic Liquid‐Incorporated Metal‐Organic Framework with High Magnesium Ion Conductivity for Quasi‐Solid‐State Magnesium Batteries.” Batteries & Supercaps 5, no. 12 (December 2022): e202200318. https://doi.org/10.1002/batt.202200318.
147
+ 1. Wei, Zhixuan, Dheeraj Kumar Singh, Katharina Helmbrecht, Joachim Sann, Yuriy Yusim, Joy A. Kieser, Clarissa Glaser, Marcus Rohnke, Axel Groß, and Jürgen Janek. “In Situ Observation of Room‐Temperature Magnesium Metal Deposition on a NASICON/IL Hybrid Solid Electrolyte.” Advanced Energy Materials 13, no. 44 (November 2023): 2302525. https://doi.org/10.1002/aenm.202302525.
148
+ 1. Weiss, Manuel, Fabian J. Simon, Martin R. Busche, Takashi Nakamura, Daniel Schröder, Felix H. Richter, and Jürgen Janek. “From Liquid- to Solid-State Batteries: Ion Transfer Kinetics of Heteroionic Interfaces.” Electrochemical Energy Reviews 3, no. 2 (June 2020): 221–38. https://doi.org/10.1007/s41918-020-00062-7.
149
+ 1. Wissel, Kerstin, Luise M. Riegger, Christian Schneider, Aamir I. Waidha, Theodosios Famprikis, Yuji Ikeda, Blazej Grabowski, et al. “Dissolution and Recrystallization Behavior of Li 3 PS 4 in Different Organic Solvents with a Focus on N -Methylformamide.” ACS Applied Energy Materials 6, no. 15 (August 14, 2023): 7790–7802. https://doi.org/10.1021/acsaem.2c03278.
150
+ 1. Ye, Ruijie, Martin Ihrig, Egbert Figgemeier, Dina Fattakhova-Rohlfing, and Martin Finsterbusch. “Aqueous Processing of LiCoO 2 –Li 6.6 La 3 Zr 1.6 Ta 0.4 O 12 Composite Cathode for High-Capacity Solid-State Lithium Batteries.” ACS Sustainable Chemistry & Engineering 11, no. 13 (April 3, 2023): 5184–94. https://doi.org/10.1021/acssuschemeng.2c07556.
151
+ 1. Yusim, Yuriy, Dirk F. Hunstock, Alexander Mayer, Dominic Bresser, Stefano Passerini, Jürgen Janek, and Anja Henss. “Investigation of the Stability of the Poly(Ethylene Oxide)|LiNi 1‐x‐y Co x Mn y O 2 Interface in Solid‐State Batteries.” Advanced Materials Interfaces 11, no. 3 (January 2024): 2300532. https://doi.org/10.1002/admi.202300532.
152
+ 1. Yusim, Yuriy, Enrico Trevisanello, Raffael Ruess, Felix H. Richter, Alexander Mayer, Dominic Bresser, Stefano Passerini, Jürgen Janek, and Anja Henss. “Evaluation and Improvement of the Stability of Poly(Ethylene Oxide)‐based Solid‐state Batteries with High‐Voltage Cathodes.” Angewandte Chemie International Edition 62, no. 12 (March 13, 2023): e202218316. https://doi.org/10.1002/anie.202218316.
153
+ 1. Zhao, Yinghan, Patrick Altschuh, Jay Santoki, Lars Griem, Giovanna Tosato, Michael Selzer, Arnd Koeppe, and Britta Nestler. “Characterization of Porous Membranes Using Artificial Neural Networks.” Acta Materialia 253 (July 2023): 118922. https://doi.org/10.1016/j.actamat.2023.118922.
154
+ 1. Zhao, Yinghan, Svenja-K. Otto, Nico Brandt, Michael Selzer, and Britta Nestler. “Application of Random Forests in ToF-SIMS Data.” Procedia Computer Science 176 (2020): 410–19. https://doi.org/10.1016/j.procs.2020.08.042.
155
+ 1. Zhao, Yinghan, Svenja-K. Otto, Teo Lombardo, Anja Henss, Arnd Koeppe, Michael Selzer, Jürgen Janek, and Britta Nestler. “Identification of Lithium Compounds on Surfaces of Lithium Metal Anode with Machine-Learning-Assisted Analysis of ToF-SIMS Spectra.” ACS Applied Materials & Interfaces 15, no. 43 (November 1, 2023): 50469–78. https://doi.org/10.1021/acsami.3c09643.
156
+ 1. Zhao, Yinghan, Nikolas Schiffmann, Arnd Koeppe, Nico Brandt, Ethel C. Bucharsky, Karl G. Schell, Michael Selzer, and Britta Nestler. “Machine Learning Assisted Design of Experiments for Solid State Electrolyte Lithium Aluminum Titanium Phosphate.” Frontiers in Materials 9 (February 3, 2022): 821817. https://doi.org/10.3389/fmats.2022.821817.
157
+ 1. Zhu, Chao, Till Fuchs, Stefan A. L. Weber, Felix. H. Richter, Gunnar Glasser, Franjo Weber, Hans-Jürgen Butt, Jürgen Janek, and Rüdiger Berger. “Understanding the Evolution of Lithium Dendrites at Li6.25Al0.25La3Zr2O12 Grain Boundaries via Operando Microscopy Techniques.” Nature Communications 14, no. 1 (March 9, 2023): 1300. https://doi.org/10.1038/s41467-023-36792-7.
158
+ 1. Zuo, Tong‐Tong, Felix Walther, Jun Hao Teo, Raffael Rueß, Yubo Wang, Marcus Rohnke, Daniel Schröder, Linda F. Nazar, and Jürgen Janek. “Impact of the Chlorination of Lithium Argyrodites on the Electrolyte/Cathode Interface in Solid‐State Batteries.” Angewandte Chemie International Edition 62, no. 7 (February 6, 2023): e202213228. https://doi.org/10.1002/anie.202213228.
159
+ 1. Kadi4Mat help page: https://kadi.iam.kit.edu/
160
+ 1. FestBatt web page: https://festbatt.net/"""
requirements.txt ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ python-dotenv
2
+ langchain==0.2.3
3
+ text-generation
4
+ pypdf
5
+ gradio
6
+ faiss-cpu
7
+ chromadb
8
+ rank-bm25
9
+ spacy
10
+ unstructured
11
+ unstructured[pdf,xml]
12
+ pdfminer.six
13
+ tiktoken
14
+ openai
15
+ langchain-openai
16
+ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.7.1/en_core_web_sm-3.7.1.tar.gz
17
+ sentence-transformers
rerank.py ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Retrank with cross encoder.
3
+ https://medium.aiplanet.com/advanced-rag-cohere-re-ranker-99acc941601c
4
+ https://github.com/langchain-ai/langchain/issues/13076
5
+ """
6
+
7
+ from __future__ import annotations
8
+ from typing import Optional, Sequence
9
+ from langchain.schema import Document
10
+ from langchain.pydantic_v1 import Extra, root_validator
11
+
12
+ from langchain.callbacks.manager import Callbacks
13
+ from langchain.retrievers.document_compressors.base import BaseDocumentCompressor
14
+
15
+ from sentence_transformers import CrossEncoder
16
+
17
+
18
+ class BgeRerank(BaseDocumentCompressor):
19
+ """
20
+ Re-rank with CrossEncoder.
21
+
22
+ Ref:
23
+ https://medium.aiplanet.com/advanced-rag-cohere-re-ranker-99acc941601c
24
+ https://github.com/langchain-ai/langchain/issues/13076
25
+ good to read:
26
+ https://zhuanlan.zhihu.com/p/676008717 or its source https://teemukanstren.com/2023/12/25/llmrag-based-question-answering/
27
+ """
28
+
29
+ # Note: switch to jina-turbo due to speed consideration
30
+ # original was "BAAI/bge-reranker-large"
31
+ model_name: str = "jinaai/jina-reranker-v1-turbo-en"
32
+ """Model name to use for reranking."""
33
+ top_n: int = 6
34
+ """Number of documents to return."""
35
+ model: CrossEncoder = CrossEncoder(model_name, trust_remote_code=True)
36
+ """CrossEncoder instance to use for reranking."""
37
+
38
+ def bge_rerank(self, query, docs):
39
+ model_inputs = [[query, doc] for doc in docs]
40
+ scores = self.model.predict(model_inputs)
41
+ results = sorted(enumerate(scores), key=lambda x: x[1], reverse=True)
42
+ return results[: self.top_n]
43
+
44
+ class Config:
45
+ """Configuration for this pydantic object."""
46
+
47
+ extra = Extra.forbid
48
+ arbitrary_types_allowed = True
49
+
50
+ def compress_documents(
51
+ self,
52
+ documents: Sequence[Document],
53
+ query: str,
54
+ callbacks: Optional[Callbacks] = None,
55
+ ) -> Sequence[Document]:
56
+ """
57
+ Compress documents using BAAI/bge-reranker models.
58
+
59
+ Args:
60
+ documents: A sequence of documents to compress.
61
+ query: The query to use for compressing the documents.
62
+ callbacks: Callbacks to run during the compression process.
63
+
64
+ Returns:
65
+ A sequence of compressed documents.
66
+ """
67
+ if len(documents) == 0: # to avoid empty api call
68
+ return []
69
+ doc_list = list(documents)
70
+ _docs = [d.page_content for d in doc_list]
71
+ results = self.bge_rerank(query, _docs)
72
+ final_results = []
73
+ for r in results:
74
+ doc = doc_list[r[0]]
75
+ doc.metadata["relevance_score"] = r[1]
76
+ final_results.append(doc)
77
+
78
+ return final_results
retrievers.py ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ from langchain.text_splitter import (
4
+ CharacterTextSplitter,
5
+ RecursiveCharacterTextSplitter,
6
+ SpacyTextSplitter,
7
+ )
8
+
9
+ from rerank import BgeRerank
10
+ from langchain.retrievers import ContextualCompressionRetriever
11
+
12
+ def get_parent_doc_retriever(
13
+ documents,
14
+ vectorstore,
15
+ add_documents=True,
16
+ docstore="in_memory",
17
+ save_path_root="./",
18
+ docstore_file="store_location",
19
+ save_vectorstore=False,
20
+ save_docstore=False,
21
+ k=10,
22
+ ):
23
+ """Parent document (small-to-big) retriever."""
24
+
25
+ # TODO need better design
26
+ # Ref: explain how it works: https://clusteredbytes.pages.dev/posts/2023/langchain-parent-document-retriever/
27
+ from langchain.storage.file_system import LocalFileStore
28
+ from langchain.storage import InMemoryStore
29
+ from langchain.storage._lc_store import create_kv_docstore
30
+ from langchain.retrievers import ParentDocumentRetriever
31
+
32
+ # Document store for parent, different from (child) docs in vectorestore
33
+ if docstore == "in_memory":
34
+ docstore = InMemoryStore()
35
+ elif docstore == "local_storage":
36
+ # Ref: https://stackoverflow.com/questions/77385587/persist-parentdocumentretriever-of-langchain
37
+ fs = LocalFileStore(docstore_file)
38
+ docstore = create_kv_docstore(fs)
39
+ elif docstore == "sql":
40
+ from langchain_rag.storage import SQLStore
41
+
42
+ # Instantiate the SQLStore with the root path
43
+ docstore = SQLStore(namespace="test", db_url="sqlite:///parent_retrieval_db.db") # TODO: WIP
44
+ else:
45
+ docstore = docstore # TODO: add check
46
+ # raise # TODO implement
47
+
48
+ # TODO: how to better set this?
49
+ # parent_splitter = RecursiveCharacterTextSplitter(separators=["\n\n", "\n"], chunk_size=1024, chunk_overlap=256)
50
+ # child_splitter = RecursiveCharacterTextSplitter(separators=["\n\n", "\n"], chunk_size=256, chunk_overlap=64)
51
+ parent_splitter = SpacyTextSplitter.from_tiktoken_encoder(
52
+ chunk_size=512,
53
+ chunk_overlap=128,
54
+ )
55
+ child_splitter = SpacyTextSplitter.from_tiktoken_encoder(
56
+ chunk_size=256,
57
+ chunk_overlap=64,
58
+ )
59
+
60
+ retriever = ParentDocumentRetriever(
61
+ vectorstore=vectorstore,
62
+ docstore=docstore,
63
+ child_splitter=child_splitter,
64
+ parent_splitter=parent_splitter,
65
+ search_kwargs={"k": k}, # Better settings?
66
+ )
67
+
68
+ if add_documents:
69
+ retriever.add_documents(documents) # , ids=None)
70
+
71
+ if save_vectorstore:
72
+ vectorstore.save_local(os.path.join(save_path_root, "faiss_index"))
73
+
74
+ if save_docstore:
75
+ import pickle
76
+
77
+ def save_to_pickle(obj, filename):
78
+ with open(filename, "wb") as file:
79
+ pickle.dump(obj, file, pickle.HIGHEST_PROTOCOL)
80
+
81
+ save_to_pickle(docstore, os.path.join(save_path_root, "docstore.pkl"))
82
+
83
+
84
+ return retriever
85
+
86
+
87
+ def get_rerank_retriever(base_retriever, reranker=None):
88
+ """Return rerank retriever."""
89
+
90
+ # Use default BgeRerank or user defined reranker
91
+ if reranker is None:
92
+ compressor = BgeRerank()
93
+ else: # TODO : add check
94
+ compressor = reranker
95
+ compression_retriever = ContextualCompressionRetriever(
96
+ base_compressor=compressor, base_retriever=base_retriever
97
+ )
98
+
99
+ return compression_retriever
vectorestores.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ from langchain.vectorstores import Chroma, FAISS
2
+
3
+ def get_faiss_vectorestore(embeddings):
4
+ # Add extra text to ini
5
+ texts = ["LISA - Lithium Ion Solid-state Assistant"]
6
+ vectorstore = FAISS.from_texts(texts, embeddings)
7
+
8
+ return vectorstore